mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-26 21:26:37 +08:00
16 lines
294 B
TypeScript
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;
|
|
}
|