import Image from "next/image"; import { MarkdownComponent } from "@/components/ui/markdown-component"; import { ScrollArea } from "@radix-ui/react-scroll-area"; import { getAssetUrl } from "@hoarder/shared-react/utils/assetUtils"; import { BookmarkTypes, ZBookmark } from "@hoarder/shared/types/bookmarks"; export function TextContentSection({ bookmark }: { bookmark: ZBookmark }) { if (bookmark.content.type != BookmarkTypes.TEXT) { throw new Error("Invalid content type"); } const banner = bookmark.assets.find( (asset) => asset.assetType == "bannerImage", ); return ( {banner && (
banner
)} {bookmark.content.text}
); }