"use client"; import type { Player } from "@lordicon/react"; import { motion } from "framer-motion"; import { useRef } from "react"; import LordIcon from "./LordIcon"; interface Paste { id: string; title: string | null; content: string | null; createdAt: string | Date; views: number; } export default function PasteCard({ paste, onDelete, pasteIconUrl, }: { paste: Paste; onDelete: (id: string) => void; pasteIconUrl: string; }) { const pasteIconRef = useRef(null); return ( pasteIconRef.current?.playFromBeginning()} onMouseLeave={() => pasteIconRef.current?.goToFirstFrame()} >
{paste.title || "Untitled"}
{paste.content || "No content"}
{new Date(paste.createdAt).toLocaleString()} {paste.views} views
View
); }