diff --git a/teachertool/src/App.tsx b/teachertool/src/App.tsx index 4973715e2cf8..13a9b3bf4391 100644 --- a/teachertool/src/App.tsx +++ b/teachertool/src/App.tsx @@ -8,7 +8,6 @@ import { logDebug } from "./services/loggingService"; import { HeaderBar } from "./components/HeaderBar"; import { MainPanel } from "./components/MainPanel"; import { Toasts } from "./components/Toasts"; -import { CatalogModal } from "./components/CatalogModal"; import { showToast } from "./transforms/showToast"; import { loadCatalogAsync } from "./transforms/loadCatalogAsync"; import { loadValidatorPlansAsync } from "./transforms/loadValidatorPlansAsync"; @@ -16,6 +15,7 @@ import { tryLoadLastActiveRubricAsync } from "./transforms/tryLoadLastActiveRubr import { ImportRubricModal } from "./components/ImportRubricModal"; import { ConfirmationModal } from "./components/ConfirmationModal"; import { BlockPickerModal } from "./components/BlockPickerModal"; +import { ScreenReaderAnnouncer } from "./components/ScreenReaderAnnouncer"; export const App = () => { const { state, dispatch } = useContext(AppStateContext); @@ -57,11 +57,11 @@ export const App = () => { <> - + ); }; diff --git a/teachertool/src/components/AddCriteriaButton.tsx b/teachertool/src/components/AddCriteriaButton.tsx index 8e3935c20876..35667262bff9 100644 --- a/teachertool/src/components/AddCriteriaButton.tsx +++ b/teachertool/src/components/AddCriteriaButton.tsx @@ -1,29 +1,22 @@ -import { getSelectableCatalogCriteria } from "../state/helpers"; import { Button } from "react-common/components/controls/Button"; -import { showModal } from "../transforms/showModal"; import { AppStateContext } from "../state/appStateContext"; -import { useContext, useMemo } from "react"; +import { useContext } from "react"; import { classList } from "react-common/components/util"; import { Strings } from "../constants"; -import { CatalogDisplayOptions } from "../types/modalOptions"; +import { setCatalogOpen } from "../transforms/setCatalogOpen"; interface IProps {} export const AddCriteriaButton: React.FC = ({}) => { const { state: teacherTool } = useContext(AppStateContext); - const hasAvailableCriteria = useMemo( - () => getSelectableCatalogCriteria(teacherTool).length > 0, - [teacherTool.catalog, teacherTool.rubric] - ); - return ( + return !teacherTool.catalogOpen ? (