diff --git a/src/components/Bookmarks.tsx b/src/components/Bookmarks.tsx index efaba060..fdfd7d61 100644 --- a/src/components/Bookmarks.tsx +++ b/src/components/Bookmarks.tsx @@ -139,6 +139,7 @@ const Bookmarks: React.FC = ({ relayPool, onLogout }) => { selectedUrl={selectedUrl} onToggleUnderlines={setShowUnderlines} selectedHighlightId={selectedHighlightId} + onRefresh={handleFetchHighlights} /> diff --git a/src/components/HighlightsPanel.tsx b/src/components/HighlightsPanel.tsx index 9d9da7fc..6c6bd64e 100644 --- a/src/components/HighlightsPanel.tsx +++ b/src/components/HighlightsPanel.tsx @@ -1,6 +1,6 @@ import React, { useMemo, useState } from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faChevronRight, faChevronLeft, faHighlighter, faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons' +import { faChevronRight, faChevronLeft, faHighlighter, faEye, faEyeSlash, faRotate } from '@fortawesome/free-solid-svg-icons' import { Highlight } from '../types/highlights' import { HighlightItem } from './HighlightItem' @@ -13,6 +13,7 @@ interface HighlightsPanelProps { selectedUrl?: string onToggleUnderlines?: (show: boolean) => void selectedHighlightId?: string + onRefresh?: () => void } export const HighlightsPanel: React.FC = ({ @@ -23,7 +24,8 @@ export const HighlightsPanel: React.FC = ({ onSelectUrl, selectedUrl, onToggleUnderlines, - selectedHighlightId + selectedHighlightId, + onRefresh }) => { const [showUnderlines, setShowUnderlines] = useState(true) @@ -81,6 +83,17 @@ export const HighlightsPanel: React.FC = ({ {!loading && ({filteredHighlights.length})}
+ {onRefresh && ( + + )} {filteredHighlights.length > 0 && (