diff --git a/src/components/FormButtons.tsx b/src/components/FormButtons.tsx index 0f927271..f4dcc0c9 100644 --- a/src/components/FormButtons.tsx +++ b/src/components/FormButtons.tsx @@ -4,7 +4,7 @@ import React from 'react'; interface IFormButtons { formData: any; - onClick: (formData: any) => void; + onClick: (formData: any) => void; isCreateCentered?: boolean; isCreatedFacilitator?: boolean; isCreatedLearner?: boolean; @@ -26,7 +26,7 @@ const FormButtons: React.FC = ({ const buttonText = isSingleButton ? t('COMMON.SAVE') : (isCreateCentered && !isCreatedFacilitator && !isCreatedLearner) || - (isCreatedLearner && !isCreatedFacilitator && !isCreateCentered) + (isCreatedLearner && !isCreatedFacilitator && !isCreateCentered) ? t('COMMON.CREATE') : t('GUIDE_TOUR.NEXT'); @@ -75,7 +75,10 @@ const FormButtons: React.FC = ({ height: '2.5rem', padding: theme.spacing(1), fontWeight: '500', - width: '100%', + width: + !isSingleButton && !isCreateCentered && !isCreatedFacilitator + ? '50%' + : '100%', }} type="submit" onClick={() => onClick(formData)} diff --git a/src/components/Header.tsx b/src/components/Header.tsx index a391dff0..985ff0bf 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -16,6 +16,7 @@ import menuIcon from '../assets/images/menuIcon.svg'; import { useTheme } from '@mui/material/styles'; import { useTranslation } from 'next-i18next'; import StyledMenu from './StyledMenu'; +import MenuDrawer from './MenuDrawer'; interface HeaderProps { toggleDrawer?: (newOpen: boolean) => () => void; @@ -43,7 +44,7 @@ const Header: React.FC = ({ toggleDrawer, openDrawer }) => { logEvent({ action: 'my-profile-clicked-header', category: 'Dashboard', - label: 'Profile Clicked' + label: 'Profile Clicked', }); } }; @@ -54,7 +55,6 @@ const Header: React.FC = ({ toggleDrawer, openDrawer }) => { action: 'logout-clicked-header', category: 'Dashboard', label: 'Logout Clicked', - }); }; @@ -73,9 +73,9 @@ const Header: React.FC = ({ toggleDrawer, openDrawer }) => { const handleToggleDrawer = (newOpen: boolean) => () => { setOpenMenu(newOpen); }; - const MenuDrawer = dynamic(() => import('./MenuDrawer'), { - ssr: false, - }); + // const MenuDrawer = dynamic(() => import('./MenuDrawer'), { + // ssr: false, + // }); const [selectedLanguage, setSelectedLanguage] = useState('en'); useEffect(() => { @@ -141,7 +141,6 @@ const Header: React.FC = ({ toggleDrawer, openDrawer }) => { { if (openDrawer) { - if (toggleDrawer) { toggleDrawer(true)(); } @@ -246,8 +245,8 @@ const Header: React.FC = ({ toggleDrawer, openDrawer }) => { />