Created a prototype for one exercise of the reading module
This commit is contained in:
19
src/stores/examStore.ts
Normal file
19
src/stores/examStore.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import {Module} from "@/interfaces";
|
||||
import {create} from "zustand";
|
||||
|
||||
const useExamStore = create((set) => ({
|
||||
reading: undefined,
|
||||
listening: undefined,
|
||||
speaking: undefined,
|
||||
writing: undefined,
|
||||
updateModule: (module: Module, id: string) => set(() => ({[module]: id})),
|
||||
clearExam: () =>
|
||||
set(() => ({
|
||||
reading: undefined,
|
||||
listening: undefined,
|
||||
speaking: undefined,
|
||||
writing: undefined,
|
||||
})),
|
||||
}));
|
||||
|
||||
export default useExamStore;
|
||||
Reference in New Issue
Block a user