Files
DefectingCat.github.io/store/index.ts
DefectingCat b19914b68a format code
remove end of line
2023-05-17 14:58:22 +08:00

17 lines
322 B
TypeScript

import { create } from 'zustand';
interface MainStore {
modelLoading: boolean;
toggleLoading: (loaded: boolean) => void;
}
const useMainStore = create<MainStore>()((set) => ({
modelLoading: true,
toggleLoading: (loaded) =>
set(() => ({
modelLoading: loaded,
})),
}));
export default useMainStore;