"use client"; import Image from "next/image"; import Link from "next/link"; import type { ZBookmarkTypeAsset } from "@hoarder/shared/types/bookmarks"; import { getAssetUrl } from "@hoarder/shared-react/utils/assetUtils"; import { getSourceUrl } from "@hoarder/shared-react/utils/bookmarkUtils"; import { BookmarkLayoutAdaptingCard } from "./BookmarkLayoutAdaptingCard"; import FooterLinkURL from "./FooterLinkURL"; function AssetImage({ bookmark, className, }: { bookmark: ZBookmarkTypeAsset; className?: string; }) { const bookmarkedAsset = bookmark.content; switch (bookmarkedAsset.assetType) { case "image": { return ( asset ); } case "pdf": { return (