Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Stabilize trip viewer close callback

Anand Baburajana58bec978049
diff --git a/web/apps/albums/src/public-album/components/TripLayout/index.tsx b/web/apps/albums/src/public-album/components/TripLayout/index.tsx
index 2dd3c774e9..0f7d7d0b83 100644
--- a/web/apps/albums/src/public-album/components/TripLayout/index.tsx
+++ b/web/apps/albums/src/public-album/components/TripLayout/index.tsx
@@ -137,12 +137,12 @@ export const TripLayout: React.FC<TripLayoutProps> = ({
handleOpenFileViewer(cluster, info.fileID);
};
- const handleCloseFileViewerWithCleanup = () => {
+ const handleCloseFileViewerWithCleanup = useCallback(() => {
setInitialSidebar(undefined);
setHighlightCommentID(undefined);
setInitialAnonUserNames(undefined);
handleCloseFileViewer();
- };
+ }, [handleCloseFileViewer]);
const downloadAllFiles = () => {
if (!collection) return;