import { Card, CardContent, CardMedia, Typography, Button, Chip, Box, useMediaQuery, useTheme } from '@mui/material'; import { useUser } from '@auth0/nextjs-auth0'; import { useRouter } from 'next/navigation'; import { GalleryProduct } from '@/types'; interface ProductCardProps { product: GalleryProduct; } export default function ProductCard({ product }: ProductCardProps) { const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('md')); const { user, isLoading } = useUser(); const router = useRouter(); const handleViewProduct = () => { router.push(`/products/${product.id}`); }; const handleBuild = () => { router.push(`/builder/${product.id}`); }; return ( {product.name} {product.category && ( )} {product.description} From ${product.basePrice?.toFixed(2)} {product.isCustomizable && ( )} {!isLoading && ( {user && ( )} )} ); }