Part intro's, modals between parts and some fixes
This commit is contained in:
@@ -19,6 +19,7 @@ export interface ExamState {
|
||||
questionIndex: number;
|
||||
inactivity: number;
|
||||
shuffleMaps: ShuffleMap[];
|
||||
bgColor: string;
|
||||
}
|
||||
|
||||
export interface ExamFunctions {
|
||||
@@ -37,6 +38,7 @@ export interface ExamFunctions {
|
||||
setQuestionIndex: (questionIndex: number) => void;
|
||||
setInactivity: (inactivity: number) => void;
|
||||
setShuffleMaps: (shuffleMaps: ShuffleMap[]) => void;
|
||||
setBgColor: (bgColor: string) => void;
|
||||
reset: () => void;
|
||||
}
|
||||
|
||||
@@ -55,7 +57,8 @@ export const initialState: ExamState = {
|
||||
exerciseIndex: -1,
|
||||
questionIndex: 0,
|
||||
inactivity: 0,
|
||||
shuffleMaps: []
|
||||
shuffleMaps: [],
|
||||
bgColor: "bg-white"
|
||||
};
|
||||
|
||||
const useExamStore = create<ExamState & ExamFunctions>((set) => ({
|
||||
@@ -76,6 +79,7 @@ const useExamStore = create<ExamState & ExamFunctions>((set) => ({
|
||||
setQuestionIndex: (questionIndex: number) => set(() => ({questionIndex})),
|
||||
setInactivity: (inactivity: number) => set(() => ({inactivity})),
|
||||
setShuffleMaps: (shuffleMaps) => set(() => ({shuffleMaps})),
|
||||
setBgColor: (bgColor) => set(()=> ({bgColor})),
|
||||
|
||||
reset: () => set(() => initialState),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user