Added the permission to update the privacy of an exam
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import defaultModuleSettings from "./defaults";
|
||||
import { Action, rootReducer } from "./reducers";
|
||||
import {Action, rootReducer} from "./reducers";
|
||||
import ExamEditorStore from "./types";
|
||||
import { create } from "zustand";
|
||||
|
||||
import {create} from "zustand";
|
||||
|
||||
const useExamEditorStore = create<
|
||||
ExamEditorStore & {
|
||||
dispatch: (action: Action) => void;
|
||||
}>((set) => ({
|
||||
title: "",
|
||||
globalEdit: [],
|
||||
currentModule: "reading",
|
||||
speakingAvatars: [],
|
||||
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))
|
||||
}));
|
||||
ExamEditorStore & {
|
||||
dispatch: (action: Action) => void;
|
||||
}
|
||||
>((set) => ({
|
||||
title: "",
|
||||
globalEdit: [],
|
||||
currentModule: "reading",
|
||||
speakingAvatars: [],
|
||||
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