blob: 76cb23eabddef43d9f6fec5b8f79ec0be5dcebfc (
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 { 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");
}
return (
<ScrollArea className="h-full">
<MarkdownComponent>{bookmark.content.text}</MarkdownComponent>
</ScrollArea>
);
}
|