From 9dd93f84104c79182e68768d26c8ce7be99bed89 Mon Sep 17 00:00:00 2001 From: Youen Chéné Date: Sun, 7 Sep 2025 14:33:28 +0200 Subject: feat(web): render AI summary in markdown (#1869) * feat: wrap bookmark summary with MarkdownReadonly component to render Markdown properly. * fix: hydration errors because of the markdown component --- .../components/dashboard/bookmarks/SummarizeBookmarkArea.tsx | 7 ++++--- apps/web/components/ui/markdown/markdown-readonly.tsx | 10 ++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx b/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx index b5e89a01..e75886e1 100644 --- a/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx +++ b/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx @@ -1,5 +1,6 @@ import React from "react"; import { ActionButton } from "@/components/ui/action-button"; +import { MarkdownReadonly } from "@/components/ui/markdown/markdown-readonly"; import LoadingSpinner from "@/components/ui/spinner"; import { toast } from "@/components/ui/use-toast"; import { useClientConfig } from "@/lib/clientConfig"; @@ -52,11 +53,11 @@ function AISummary({ onClick={() => !isExpanded && setIsExpanded(true)} >
-

{summary} -

+ {isExpanded && ( ) { ); } -export function MarkdownReadonly({ children: markdown }: { children: string }) { +export function MarkdownReadonly({ + children: markdown, + className, +}: { + children: string; + className?: string; +}) { return ( ; -- cgit v1.2.3-70-g09d2