"use client"; import { AnimatePresence, motion } from "framer-motion"; import Image from "next/image"; import { useState } from "react"; import ProjectCardDropdown from "./dropdown"; import { Clock, Globe, Lock } from "lucide-react"; import { Sandbox } from "@/lib/types"; import { Card } from "@/components/ui/card"; export default function ProjectCard({ children, sandbox, onVisibilityChange, onDelete, }: { children?: React.ReactNode; sandbox: Sandbox; onVisibilityChange: (sandbox: Sandbox) => void; onDelete: (sandbox: Sandbox) => void; }) { const [hovered, setHovered] = useState(false); return ( setHovered(true)} onMouseLeave={() => setHovered(false)} className="group/canvas-card p-4 h-48 flex flex-col justify-between items-start hover:border-foreground transition-all relative overflow-hidden" > {hovered && ( {children} )}
{sandbox.name}
{sandbox.visibility === "private" ? ( <> Private ) : ( <> Public )}
3d ago
); }