From 2d8afc80e6f222ace1e167ace44b9fae8dba45d6 Mon Sep 17 00:00:00 2001 From: Dang Nguyen Nguyen <93059380+NwinNwin@users.noreply.github.com> Date: Sun, 5 May 2024 17:53:41 -0700 Subject: [PATCH] reviewing --- src/pages/VolunteerEventPage.jsx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pages/VolunteerEventPage.jsx b/src/pages/VolunteerEventPage.jsx index 51038f1..9849e8d 100644 --- a/src/pages/VolunteerEventPage.jsx +++ b/src/pages/VolunteerEventPage.jsx @@ -15,7 +15,7 @@ const VolunteerEventPage = () => { const { onNavbarDrawerOpen } = useContext(NavbarContext); const [currentEventId, setCurrentEventId] = useState(null); // Initial state is null to indicate no event selected const breakpoint = useBreakpoint(); - const [setShowOpenDrawerButton] = useState(false); + const [showOpenDrawerButton, setShowOpenDrawerButton] = useState(false); const openEventDrawer = eventId => { setCurrentEventId(eventId); // Set the current event ID, which triggers the side view to display @@ -82,6 +82,7 @@ const VolunteerEventPage = () => { flex-shrink="0" borderRadius={'xl'} flexDir={'column'} + display={showOpenDrawerButton ? { base: 'flex', xl: 'none' } : 'none'} > { @@ -114,14 +114,16 @@ const VolunteerEventPage = () => { onClose={handleClose} setShowOpenDrawerButton={setShowOpenDrawerButton} /> - ) : null} - {isOpen ? ( - - ) : null} + ) : ( + isOpen && ( + + ) + )} + {/* { : null} */} ); };