From 9908cf5a29b64d93240ae0e96dfbbce776fb8f7e Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 28 Aug 2024 10:48:10 +0530 Subject: [PATCH] Debug code --- web/apps/photos/src/pages/gallery/index.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/apps/photos/src/pages/gallery/index.tsx b/web/apps/photos/src/pages/gallery/index.tsx index 9bd21abecd..04b4e611e7 100644 --- a/web/apps/photos/src/pages/gallery/index.tsx +++ b/web/apps/photos/src/pages/gallery/index.tsx @@ -6,6 +6,7 @@ import { getLocalFiles, getLocalTrashedFiles, } from "@/new/photos/services/files"; +import { wipClusterEnable } from "@/new/photos/services/ml"; import { EnteFile } from "@/new/photos/types/file"; import { mergeMetadata } from "@/new/photos/utils/file"; import { CenteredFlex } from "@ente/shared/components/Container"; @@ -669,6 +670,17 @@ export default function Gallery() { }; }, [selectAll, clearSelection]); + useEffect(() => { + // TODO-Cluster + if (process.env.NEXT_PUBLIC_ENTE_WIP_CL) { + setTimeout(() => { + void wipClusterEnable().then( + (y) => y && router.push("cluster-debug"), + ); + }, 2000); + } + }, []); + const fileToCollectionsMap = useMemoSingleThreaded(() => { return constructFileToCollectionMap(files); }, [files]);