Debug code

This commit is contained in:
Manav Rathi
2024-08-28 10:48:10 +05:30
parent 0657b16002
commit 9908cf5a29

View File

@@ -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]);