ChatGPT-Next-Web/app/SyncOnFirstLoad.tsx
2025-06-25 14:57:12 +07:00

16 lines
294 B
TypeScript

"use client";
import { useEffect } from "react";
import { useSyncStore } from "./store/sync";
export default function SyncOnFirstLoad() {
const syncStore = useSyncStore();
useEffect(() => {
if (syncStore.lastSyncTime === 0) {
syncStore.sync();
}
}, []);
return null;
}