From 0d35bcfe380afb5502fcf608515a3be83c11c11d Mon Sep 17 00:00:00 2001 From: Bailey Pumfleet Date: Fri, 16 Apr 2021 17:36:27 +0100 Subject: [PATCH] Implement mobile menu --- components/Shell.tsx | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/components/Shell.tsx b/components/Shell.tsx index 5379846ae7..0661318c06 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -7,11 +7,16 @@ export default function Shell(props) { const router = useRouter(); const [ session, loading ] = useSession(); const [ profileDropdownExpanded, setProfileDropdownExpanded ] = useState(false); + const [ mobileMenuExpanded, setMobileMenuExpanded ] = useState(false); const toggleProfileDropdown = () => { setProfileDropdownExpanded(!profileDropdownExpanded); } + const toggleMobileMenu = () => { + setMobileMenuExpanded(!mobileMenuExpanded); + } + return (
@@ -72,27 +77,31 @@ export default function Shell(props) {
-
-
+ { mobileMenuExpanded &&
- Dashboard - Bookings - Availability - Integrations - Teams + + Dashboard + + + Availability + + + Integrations +
@@ -111,12 +120,17 @@ export default function Shell(props) {
- Your Profile - Settings - Sign out + + Your Profile + + + Settings + +
+ }