From 820daa489edbc37ad9fb168bbca6ce858f930a4b Mon Sep 17 00:00:00 2001 From: Gigi Date: Tue, 14 Oct 2025 11:52:29 +0200 Subject: [PATCH] feat: hide citation in highlights sidebar for current article - Add showCitation prop to HighlightItem (defaults to true) - Set showCitation={false} in HighlightsPanel - Reduces redundancy since all sidebar highlights are from same article - Citation still shown in Explore and Me pages where context is needed --- src/components/HighlightItem.tsx | 14 +++++++++----- src/components/HighlightsPanel.tsx | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/HighlightItem.tsx b/src/components/HighlightItem.tsx index 194a5aa0..f4fe0e6a 100644 --- a/src/components/HighlightItem.tsx +++ b/src/components/HighlightItem.tsx @@ -31,6 +31,7 @@ interface HighlightItemProps { eventStore?: IEventStore | null onHighlightUpdate?: (highlight: Highlight) => void onHighlightDelete?: (highlightId: string) => void + showCitation?: boolean } export const HighlightItem: React.FC = ({ @@ -41,7 +42,8 @@ export const HighlightItem: React.FC = ({ relayPool, eventStore, onHighlightUpdate, - onHighlightDelete + onHighlightDelete, + showCitation = true }) => { const itemRef = useRef(null) const menuRef = useRef(null) @@ -343,10 +345,12 @@ export const HighlightItem: React.FC = ({ {highlight.content} - + {showCitation && ( + + )} {highlight.comment && (
diff --git a/src/components/HighlightsPanel.tsx b/src/components/HighlightsPanel.tsx index df4064cd..c74d7022 100644 --- a/src/components/HighlightsPanel.tsx +++ b/src/components/HighlightsPanel.tsx @@ -162,6 +162,7 @@ export const HighlightsPanel: React.FC = ({ eventStore={eventStore} onHighlightUpdate={handleHighlightUpdate} onHighlightDelete={handleHighlightDelete} + showCitation={false} /> ))}