♻️ refactor!: massive refactor

This commit is contained in:
2026-05-31 03:04:30 +07:00
parent c1f12c7201
commit df3c944547
86 changed files with 3691 additions and 1129 deletions
+6 -3
View File
@@ -1,11 +1,14 @@
"use client";
import React from "react";
import { startAssetCleanupJob } from "@pien-studio/storage";
import { localProjectRepository } from "../lib/project-repository";
export function useAssetCleanupJob() {
React.useEffect(() => {
const stop = startAssetCleanupJob();
return () => stop();
if (typeof window === "undefined") return undefined;
const id = window.setInterval(() => {
void localProjectRepository.cleanupAssets();
}, 45_000);
return () => window.clearInterval(id);
}, []);
}