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 });