From 3207264fc13c275d6dcfbd2628cc6b3974ceeaed Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Mon, 7 Apr 2025 01:03:26 +0100 Subject: feat: Allow editing bookmark details --- apps/web/components/dashboard/preview/BookmarkPreview.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apps/web/components/dashboard/preview/BookmarkPreview.tsx') diff --git a/apps/web/components/dashboard/preview/BookmarkPreview.tsx b/apps/web/components/dashboard/preview/BookmarkPreview.tsx index c78eab22..07ae0809 100644 --- a/apps/web/components/dashboard/preview/BookmarkPreview.tsx +++ b/apps/web/components/dashboard/preview/BookmarkPreview.tsx @@ -1,5 +1,6 @@ "use client"; +import React from "react"; import Link from "next/link"; import { BookmarkTagsEditor } from "@/components/dashboard/bookmarks/BookmarkTagsEditor"; import { FullPageSpinner } from "@/components/ui/full-page-spinner"; @@ -17,6 +18,7 @@ import { api } from "@/lib/trpc"; import { CalendarDays, ExternalLink } from "lucide-react"; import { + getBookmarkTitle, getSourceUrl, isBookmarkStillCrawling, isBookmarkStillLoading, @@ -27,7 +29,6 @@ import SummarizeBookmarkArea from "../bookmarks/SummarizeBookmarkArea"; import ActionBar from "./ActionBar"; import { AssetContentSection } from "./AssetContentSection"; import AttachmentBox from "./AttachmentBox"; -import { EditableTitle } from "./EditableTitle"; import HighlightsBox from "./HighlightsBox"; import LinkContentSection from "./LinkContentSection"; import { NoteEditor } from "./NoteEditor"; @@ -108,6 +109,7 @@ export default function BookmarkPreview({ } const sourceUrl = getSourceUrl(bookmark); + const title = getBookmarkTitle(bookmark); return (
@@ -116,7 +118,11 @@ export default function BookmarkPreview({
- +
+

+ {title === undefined || title === "" ? "Untitled" : title} +

+
{sourceUrl && (