From eb0a28ee6b1dd15fb459e0900f5e885ac5c92fec Mon Sep 17 00:00:00 2001 From: kamtschatka Date: Sun, 21 Jul 2024 23:36:11 +0200 Subject: [PATCH] refactor: Remove unused BookmarkedTextViewer (#310) --- .../bookmarks/BookmarkedTextViewer.tsx | 23 ------------------- .../dashboard/bookmarks/TextCard.tsx | 8 ------- 2 files changed, 31 deletions(-) delete mode 100644 apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx diff --git a/apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx b/apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx deleted file mode 100644 index 88382cf7..00000000 --- a/apps/web/components/dashboard/bookmarks/BookmarkedTextViewer.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Dialog, DialogContent } from "@/components/ui/dialog"; -import Markdown from "react-markdown"; -import remarkGfm from "remark-gfm"; - -export function BookmarkedTextViewer({ - content, - open, - setOpen, -}: { - content: string; - open: boolean; - setOpen: (open: boolean) => void; -}) { - return ( - - - - {content} - - - - ); -} diff --git a/apps/web/components/dashboard/bookmarks/TextCard.tsx b/apps/web/components/dashboard/bookmarks/TextCard.tsx index ffaa18a4..6fa2a1cf 100644 --- a/apps/web/components/dashboard/bookmarks/TextCard.tsx +++ b/apps/web/components/dashboard/bookmarks/TextCard.tsx @@ -1,13 +1,11 @@ "use client"; -import { useState } from "react"; import { MarkdownComponent } from "@/components/ui/markdown-component"; import { bookmarkLayoutSwitch } from "@/lib/userLocalSettings/bookmarksLayout"; import { cn } from "@/lib/utils"; import type { ZBookmarkTypeText } from "@hoarder/shared/types/bookmarks"; -import { BookmarkedTextViewer } from "./BookmarkedTextViewer"; import { BookmarkLayoutAdaptingCard } from "./BookmarkLayoutAdaptingCard"; export default function TextCard({ @@ -17,16 +15,10 @@ export default function TextCard({ bookmark: ZBookmarkTypeText; className?: string; }) { - const [previewModalOpen, setPreviewModalOpen] = useState(false); const bookmarkedText = bookmark.content; return ( <> - {bookmarkedText.text}}