From be7311a7db8c9dcc373090b06b825995a3682ee4 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sun, 31 Aug 2025 16:09:12 +0100 Subject: fix(mobile): Fix text bookmark editor --- .../components/bookmarks/BookmarkLinkView.tsx | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 apps/mobile/components/bookmarks/BookmarkLinkView.tsx (limited to 'apps/mobile/components/bookmarks/BookmarkLinkView.tsx') diff --git a/apps/mobile/components/bookmarks/BookmarkLinkView.tsx b/apps/mobile/components/bookmarks/BookmarkLinkView.tsx new file mode 100644 index 00000000..e8a78029 --- /dev/null +++ b/apps/mobile/components/bookmarks/BookmarkLinkView.tsx @@ -0,0 +1,35 @@ +import { + BookmarkLinkArchivePreview, + BookmarkLinkBrowserPreview, + BookmarkLinkReaderPreview, + BookmarkLinkScreenshotPreview, +} from "@/components/bookmarks/BookmarkLinkPreview"; + +import { BookmarkTypes, ZBookmark } from "@karakeep/shared/types/bookmarks"; + +import { BookmarkLinkType } from "./BookmarkLinkTypeSelector"; + +interface BookmarkLinkViewProps { + bookmark: ZBookmark; + bookmarkPreviewType: BookmarkLinkType; +} + +export default function BookmarkLinkView({ + bookmark, + bookmarkPreviewType, +}: BookmarkLinkViewProps) { + if (bookmark.content.type !== BookmarkTypes.LINK) { + throw new Error("Wrong content type rendered"); + } + + switch (bookmarkPreviewType) { + case "browser": + return ; + case "reader": + return ; + case "screenshot": + return ; + case "archive": + return ; + } +} -- cgit v1.2.3-70-g09d2