From fcb60baa24d467484cb6face8534a56242664b3d Mon Sep 17 00:00:00 2001 From: thsparks Date: Tue, 26 Mar 2024 16:37:28 -0700 Subject: [PATCH] Remove modal from state, only use ModalOptions instead --- .../src/components/AddCriteriaButton.tsx | 3 ++- .../src/components/BlockPickerModal.tsx | 4 ++-- teachertool/src/components/CatalogModal.tsx | 2 +- .../src/components/ConfirmationModal.tsx | 18 ++++++++--------- .../components/CriteriaInstanceDisplay.tsx | 9 +++++++-- teachertool/src/components/HomeScreen.tsx | 3 ++- .../src/components/ImportRubricModal.tsx | 2 +- .../src/components/RubricWorkspace.tsx | 3 ++- teachertool/src/state/actions.ts | 20 ++++--------------- teachertool/src/state/reducer.ts | 10 ++-------- teachertool/src/state/state.ts | 4 +--- teachertool/src/transforms/confirmAsync.ts | 20 +++++++------------ teachertool/src/transforms/hideModal.ts | 2 +- teachertool/src/transforms/showBlockPicker.ts | 18 ----------------- teachertool/src/transforms/showModal.ts | 4 ++-- teachertool/src/types/index.ts | 2 -- teachertool/src/types/modalOptions.ts | 20 +++++++++++-------- 17 files changed, 55 insertions(+), 89 deletions(-) delete mode 100644 teachertool/src/transforms/showBlockPicker.ts diff --git a/teachertool/src/components/AddCriteriaButton.tsx b/teachertool/src/components/AddCriteriaButton.tsx index 5e51815e3676..8e3935c20876 100644 --- a/teachertool/src/components/AddCriteriaButton.tsx +++ b/teachertool/src/components/AddCriteriaButton.tsx @@ -5,6 +5,7 @@ import { AppStateContext } from "../state/appStateContext"; import { useContext, useMemo } from "react"; import { classList } from "react-common/components/util"; import { Strings } from "../constants"; +import { CatalogDisplayOptions } from "../types/modalOptions"; interface IProps {} @@ -19,7 +20,7 @@ export const AddCriteriaButton: React.FC = ({}) => {