blob: 2df1e964c3f7284d6fb63cb00c96d7c386f01dab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { MarkdownComponent } from "@/components/ui/markdown-component";
import { ScrollArea } from "@radix-ui/react-scroll-area";
import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
export function TextContentSection({ bookmark }: { bookmark: ZBookmark }) {
if (bookmark.content.type != "text") {
throw new Error("Invalid content type");
}
return (
<ScrollArea className="h-full">
<MarkdownComponent>{bookmark.content.text}</MarkdownComponent>
</ScrollArea>
);
}
|