diff --git a/src/photo/PhotoGridPage.tsx b/src/photo/PhotoGridPage.tsx index 79447493..56b97b8f 100644 --- a/src/photo/PhotoGridPage.tsx +++ b/src/photo/PhotoGridPage.tsx @@ -26,7 +26,10 @@ export default function PhotoGridPage({ const { setSelectedPhotoIds } = useAppState(); useEffect( - () => () => setSelectedPhotoIds?.(undefined), + () => { + console.log('PhotoGridPage: unmount'); + return () => setSelectedPhotoIds?.(undefined); + }, [setSelectedPhotoIds] );