From 3be8e8092d9b26f38047c84151417fa3e3f28911 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Wed, 12 Feb 2025 10:50:26 +0100 Subject: [PATCH] ui: reload hls on site change --- frontend/app/components/Highlights/HighlightsList.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/Highlights/HighlightsList.tsx b/frontend/app/components/Highlights/HighlightsList.tsx index b4bdc226f..e09095e7f 100644 --- a/frontend/app/components/Highlights/HighlightsList.tsx +++ b/frontend/app/components/Highlights/HighlightsList.tsx @@ -14,7 +14,7 @@ import HighlightsListHeader from './HighlightsListHeader'; import withPermissions from 'HOCs/withPermissions'; function HighlightsList() { - const { notesStore } = useStore(); + const { notesStore, projectsStore } = useStore(); const [activeId, setActiveId] = React.useState(null); const [editModalOpen, setEditModalOpen] = React.useState(false); const [editHl, setEditHl] = React.useState>({ @@ -22,6 +22,7 @@ function HighlightsList() { isPublic: false }); + const activeProject = projectsStore.activeSiteId; const query = notesStore.query; const limit = notesStore.pageSize; const listLength = notesStore.notes.length; @@ -33,7 +34,7 @@ function HighlightsList() { isPending, refetch } = useQuery({ - queryKey: ['notes', page, query, activeTags], + queryKey: ['notes', page, query, activeTags, activeProject], queryFn: () => notesStore.fetchNotes(), retry: 3 });