Blanks Exercises were removing the blanks on the editor and text but not on solutions, added submit and preview to writing and reading
This commit is contained in:
@@ -9,8 +9,10 @@ export const rootReducer = (
|
||||
state: ExamEditorStore,
|
||||
action: Action
|
||||
): Partial<ExamEditorStore> => {
|
||||
console.log(action.type);
|
||||
|
||||
if (MODULE_ACTIONS.includes(action.type as any)) {
|
||||
if (action.type === "REORDER_EXERCISES" && "payload" in action && "event" in action.payload) {
|
||||
if (action.type === "REORDER_EXERCISES") {
|
||||
const updatedState = sectionReducer(state, action as SectionActions);
|
||||
if (!updatedState.modules) return state;
|
||||
|
||||
@@ -26,7 +28,7 @@ export const rootReducer = (
|
||||
if (SECTION_ACTIONS.includes(action.type as any)) {
|
||||
if (action.type === "UPDATE_SECTION_STATE") {
|
||||
const updatedState = sectionReducer(state, action as SectionActions);
|
||||
if (!updatedState.modules) return state;
|
||||
if (!updatedState.modules) return state;
|
||||
|
||||
return moduleReducer({
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user