mirror of
https://github.com/YuzuZensai/Pien-Studio.git
synced 2026-09-02 14:18:35 +00:00
15 lines
397 B
TypeScript
15 lines
397 B
TypeScript
"use client";
|
|
|
|
import React from "react";
|
|
import { localProjectRepository } from "../lib/project-repository";
|
|
|
|
export function useAssetCleanupJob() {
|
|
React.useEffect(() => {
|
|
if (typeof window === "undefined") return undefined;
|
|
const id = window.setInterval(() => {
|
|
void localProjectRepository.cleanupAssets();
|
|
}, 45_000);
|
|
return () => window.clearInterval(id);
|
|
}, []);
|
|
}
|