diff --git a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx index 5e02fb680..e2c7f75ba 100644 --- a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx +++ b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx @@ -502,9 +502,7 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element { const { preferencesData, isValidating: isValidatingPreferences } = useGetUserPreferences() - const [layout, setLayout] = useState( - (preferencesData?.libraryLayoutType as LayoutType) || 'GRID_LAYOUT' - ) + const [layout, setLayout] = usePersistedState({ key: 'libraryLayout', initialValue: 'GRID_LAYOUT' }) const [showRemoveLinkConfirmation, setShowRemoveLinkConfirmation] = useState(false) const [linkToRemove, setLinkToRemove] = useState()