diff --git a/src/components/configuration/Themes.tsx b/src/components/configuration/Themes.tsx index 14a265aaeb..8ce6707c00 100644 --- a/src/components/configuration/Themes.tsx +++ b/src/components/configuration/Themes.tsx @@ -88,11 +88,12 @@ const Themes = ({
{/* Display modal for new series if add series button is clicked */} - + { displayNewThemesModal && + + } {/* Include Burger-button menu*/} diff --git a/src/components/events/Events.tsx b/src/components/events/Events.tsx index 80e4e14983..4bd47f4d92 100644 --- a/src/components/events/Events.tsx +++ b/src/components/events/Events.tsx @@ -197,9 +197,8 @@ const Events = ({ { /* Display modal for new event if add event button is clicked */ - !isFetchingAssetUploadOptions && ( + !isFetchingAssetUploadOptions && displayNewEventModal && ( diff --git a/src/components/events/Series.tsx b/src/components/events/Series.tsx index 3df361b7fd..ebc8181cdb 100644 --- a/src/components/events/Series.tsx +++ b/src/components/events/Series.tsx @@ -164,11 +164,12 @@ const Series = ({
{/* Display modal for new series if add series button is clicked */} - + { displayNewSeriesModal && + + } {displayDeleteSeriesModal && ( diff --git a/src/components/shared/NewResourceModal.tsx b/src/components/shared/NewResourceModal.tsx index 42c2babe65..848e48df43 100644 --- a/src/components/shared/NewResourceModal.tsx +++ b/src/components/shared/NewResourceModal.tsx @@ -13,10 +13,12 @@ import { availableHotkeys } from "../../configs/hotkeysConfig"; * This component renders the modal for adding new resources */ const NewResourceModal = ({ - handleClose, - showModal, - resource -}: any) => { + handleClose, + resource +}: { + handleClose: () => void, + resource: "events" | "series" | "user" | "group" | "acl" | "themes" +}) => { const { t } = useTranslation(); useHotkeys( @@ -32,57 +34,55 @@ const NewResourceModal = ({ return ( // todo: add hotkeys - showModal && ( - <> -
-
-
-
- {resource === "events" && ( - //New Event Wizard - - )} - {resource === "series" && ( - // New Series Wizard - - )} + <> +
+
+
+
- - ) +
+ {resource === "events" && ( + //New Event Wizard + + )} + {resource === "series" && ( + // New Series Wizard + + )} + {resource === "themes" && ( + // New Theme Wizard + + )} + {resource === "acl" && ( + // New ACL Wizard + + )} + {resource === "group" && ( + // New Group Wizard + + )} + {resource === "user" && ( + // New User Wizard + + )} + + ); }; diff --git a/src/components/users/Acls.tsx b/src/components/users/Acls.tsx index afda3f9d10..14f5e8cb30 100644 --- a/src/components/users/Acls.tsx +++ b/src/components/users/Acls.tsx @@ -106,11 +106,12 @@ const Acls: React.FC = () => {
{/* Display modal for new acl if add acl button is clicked */} - + { displayNewAclModal && + + } {/* Include Burger-button menu*/} diff --git a/src/components/users/Groups.tsx b/src/components/users/Groups.tsx index 5f10700310..f01e1a9b7a 100644 --- a/src/components/users/Groups.tsx +++ b/src/components/users/Groups.tsx @@ -121,11 +121,12 @@ const Groups = ({
{/* Display modal for new acl if add acl button is clicked */} - + { displayNewGroupModal && + + } {/* Include Burger-button menu*/} diff --git a/src/components/users/Users.tsx b/src/components/users/Users.tsx index 67b21af14c..b76a52ba1d 100644 --- a/src/components/users/Users.tsx +++ b/src/components/users/Users.tsx @@ -111,11 +111,12 @@ const Users: React.FC = () => {
{/* Display modal for new acl if add acl button is clicked */} - + { displayNewUserModal && + + } {/* Include Burger-button menu*/}