import { faArrowUpRightFromSquare, faChevronRight, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Image from "next/image"; import { Link as LinkType } from "@prisma/client"; type Props = { link: Omit; count: number; }; export default function LinkCard({ link, count }: Props) { const url = new URL(link.url); const formattedDate = new Date( link.createdAt as unknown as string ).toLocaleString("en-US", { year: "numeric", month: "short", day: "numeric", }); return (
{ const target = e.target as HTMLElement; target.style.opacity = "0"; }} /> { const target = e.target as HTMLElement; target.style.opacity = "0"; }} />

{count + 1}.

{link.name}

{link.title}

{formattedDate}

{url.host}

); }