Exam generation rework, batch user tables, fastapi endpoint switch
This commit is contained in:
24
src/stores/examEditor/index.ts
Normal file
24
src/stores/examEditor/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import defaultModuleSettings from "./defaults";
|
||||
import { Action, rootReducer } from "./reducers";
|
||||
import ExamEditorStore from "./types";
|
||||
import { create } from "zustand";
|
||||
|
||||
|
||||
const useExamEditorStore = create<
|
||||
ExamEditorStore & {
|
||||
dispatch: (action: Action) => void;
|
||||
}>((set) => ({
|
||||
title: "",
|
||||
globalEdit: [],
|
||||
currentModule: "reading",
|
||||
modules: {
|
||||
reading: defaultModuleSettings("reading", 60),
|
||||
writing: defaultModuleSettings("writing", 60),
|
||||
speaking: defaultModuleSettings("speaking", 14),
|
||||
listening: defaultModuleSettings("listening", 30),
|
||||
level: defaultModuleSettings("level", 60)
|
||||
},
|
||||
dispatch: (action) => set((state) => rootReducer(state, action))
|
||||
}));
|
||||
|
||||
export default useExamEditorStore;
|
||||
Reference in New Issue
Block a user