From 12e0f092b66415e8cb5a0f9ae8faa38307a8321a Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Tue, 16 Jul 2024 10:19:49 -0500 Subject: [PATCH] Debug grid page unmount --- src/photo/PhotoGridPage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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] );