Shuffles fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {Module} from "@/interfaces";
|
||||
import {Exam, ShuffleMap, UserSolution} from "@/interfaces/exam";
|
||||
import {Exam, ShuffleMap, Shuffles, UserSolution} from "@/interfaces/exam";
|
||||
import {Assignment} from "@/interfaces/results";
|
||||
import {create} from "zustand";
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface ExamState {
|
||||
exerciseIndex: number;
|
||||
questionIndex: number;
|
||||
inactivity: number;
|
||||
shuffleMaps: ShuffleMap[];
|
||||
shuffles: Shuffles[];
|
||||
bgColor: string;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface ExamFunctions {
|
||||
setExerciseIndex: (exerciseIndex: number) => void;
|
||||
setQuestionIndex: (questionIndex: number) => void;
|
||||
setInactivity: (inactivity: number) => void;
|
||||
setShuffleMaps: (shuffleMaps: ShuffleMap[]) => void;
|
||||
setShuffles: (shuffles: Shuffles[]) => void;
|
||||
setBgColor: (bgColor: string) => void;
|
||||
reset: () => void;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export const initialState: ExamState = {
|
||||
exerciseIndex: -1,
|
||||
questionIndex: 0,
|
||||
inactivity: 0,
|
||||
shuffleMaps: [],
|
||||
shuffles: [],
|
||||
bgColor: "bg-white"
|
||||
};
|
||||
|
||||
@@ -78,8 +78,8 @@ const useExamStore = create<ExamState & ExamFunctions>((set) => ({
|
||||
setExerciseIndex: (exerciseIndex: number) => set(() => ({exerciseIndex})),
|
||||
setQuestionIndex: (questionIndex: number) => set(() => ({questionIndex})),
|
||||
setInactivity: (inactivity: number) => set(() => ({inactivity})),
|
||||
setShuffleMaps: (shuffleMaps) => set(() => ({shuffleMaps})),
|
||||
setBgColor: (bgColor) => set(()=> ({bgColor})),
|
||||
setShuffles: (shuffles: Shuffles[]) => set(() => ({shuffles})),
|
||||
setBgColor: (bgColor) => set(() => ({bgColor})),
|
||||
|
||||
reset: () => set(() => initialState),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user