'use client'; import { useState } from 'react'; import { motion } from 'framer-motion'; import GpuPaymentModal from '@/components/GpuPaymentModal' interface IGPU { id: string; title: string; subTitle: string; price: string; price_usd: number; isRecentlyPurchased?: boolean; } export default function Boxes() { const [selectedGpu, setSelectedGpu] = useState(null); const gpus: IGPU[] = [ { id: 'k80', title: 'NVIDIA Tesla K80', subTitle: '24 GB GDDR5 - 4992 CUDA Cores', price: '$0.15/hour ($110/mo)', price_usd: 1, //110 }, { id: 't1000', title: 'NVIDIA T1000', subTitle: '4 GB GDDR6 - 896 CUDA Cores', price: '$0.16/hr ($119/month)', price_usd: 119, }, { id: 'a4000', title: 'NVIDIA RTX A4000', subTitle: '16 GB GDDR6 - 6144 CUDA Cores', price: '$0.17/hour ($125/mo)', price_usd: 125, isRecentlyPurchased: true, }, { id: 'a5000', title: 'NVIDIA RTX A5000', subTitle: '24 GB GDDR6 - 8192 CUDA Cores', price: '$0.22/hr ($162/month)', price_usd: 162, }, { id: 'v100', title: 'NVIDIA V100', subTitle: '32 GB HBM2 - 5120 CUDA Cores', price: '$0.23/hr ($170/month)', price_usd: 170, }, { id: 'p100', title: 'NVIDIA Tesla P100', subTitle: '16 GB HBM2 - 3584 CUDA Cores', price: '$0.27/hour ($196/mo)', price_usd: 196, }, { id: '4x4090', title: '4x NVIDIA RTX 4090', subTitle: '24 GB GDDR6X - 16384 GPU CUDA Cores', price: '$0.32/hr ($228/month)', price_usd: 228, }, { id: 'l4ada', title: 'NVIDIA L4 Ada', subTitle: '24 GB GDDR6 - 7680 CUDA Cores', price: '$0.44/hr ($316/month)', price_usd: 316, }, { id: 'a6000', title: 'NVIDIA RTX A6000', subTitle: '48 GB GDDR6 - 10752 CUDA Cores', price: '$0.45/hr ($323/month)', price_usd: 323, }, { id: 'l40sada', title: 'NVIDIA L40S Ada', subTitle: '48 GB GDDR6 - 18176 CUDA Cores', price: '$1.04/hr ($756/month)', price_usd: 756, }, { id: 'a100', title: 'NVIDIA A100 PCIe', subTitle: '40 GB HBM2 - 6912 CUDA Cores', price: '$1.36/hr ($991/month)', price_usd: 991, }, { id: 'h100nvl', title: 'NVIDIA H100 NVL', subTitle: '94 GB HBM3 - 14592 CUDA Cores', price: '$2.85/hr ($2,048/month)', price_usd: 2048, }, { id: 'h100sxm', title: 'NVIDIA H100 SXM', subTitle: '80 GB HBM3 - 14592 CUDA Cores', price: '$3.06/hr ($2,203/month)', price_usd: 2203, }, ]; return ( <>
{gpus.map((gpu, index) => (
{/* GPU SVG ICON */}

{gpu.title}

{gpu.subTitle}

{gpu.price}

{gpu.isRecentlyPurchased && (

Recently purchased

)}
{/* Corner Decorations */} {['top', 'bottom'].map((pos) => ['left', 'right'].map((side) => ( )) )}
))}
{selectedGpu && ( setSelectedGpu(null)} gpu={{ id: selectedGpu.id, title: selectedGpu.title, price_usd: selectedGpu.price_usd, price_per_hour: selectedGpu.price, // pass it here }} /> )} ); }