diff --git a/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx b/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx index d6d300be9..1ba9b468f 100644 --- a/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx +++ b/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx @@ -10,6 +10,7 @@ import { Label } from '../../../lib/networking/fragments/labelFragment' import { theme } from '../../tokens/stitches.config' import { useRegisterActions } from 'kbar' import { LogoBox } from '../../elements/LogoBox' +import { usePersistedState } from '../../../lib/hooks/usePersistedState' export const LIBRARY_LEFT_MENU_WIDTH = '233px' @@ -146,7 +147,10 @@ function SavedSearches(props: LibraryFilterMenuProps): JSX.Element { function Subscriptions(props: LibraryFilterMenuProps): JSX.Element { const { subscriptions } = useGetSubscriptionsQuery() - const [viewAll, setViewAll] = useState(false) + const [viewAll, setViewAll] = usePersistedState({ + key: `--subscriptions-view-all`, + initialValue: false, + }) useRegisterActions( (subscriptions ?? []).map((subscription, idx) => { @@ -194,7 +198,10 @@ function Subscriptions(props: LibraryFilterMenuProps): JSX.Element { function Labels(props: LibraryFilterMenuProps): JSX.Element { const { labels } = useGetLabelsQuery() - const [viewAll, setViewAll] = useState(false) + const [viewAll, setViewAll] = usePersistedState({ + key: `--labels-view-all`, + initialValue: false, + }) return (