Mobile: hide bottom nav on any sub page (#4626)
Co-authored-by: gitstart <gitstart@users.noreply.github.com> Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev> Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com> Co-authored-by: hustle-ps <grace.devolop@gmail.com> Co-authored-by: Olusanya Timothy <48022904+seunexplicit@users.noreply.github.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/4613/head
parent
e2747f89d0
commit
7d1065d228
|
@ -575,11 +575,16 @@ function MobileNavigationContainer() {
|
|||
|
||||
const MobileNavigation = () => {
|
||||
const isEmbed = useIsEmbed();
|
||||
const router = useRouter();
|
||||
const isSubNav = router.pathname.split("/").length > 3;
|
||||
|
||||
return (
|
||||
<>
|
||||
<nav
|
||||
className={classNames(
|
||||
"bottom-nav fixed bottom-0 z-30 -mx-4 flex w-full border border-t border-gray-200 bg-gray-50 bg-opacity-40 px-1 shadow backdrop-blur-md md:hidden",
|
||||
isSubNav
|
||||
? "hidden"
|
||||
: "bottom-nav fixed bottom-0 z-30 -mx-4 flex w-full border border-t border-gray-200 bg-gray-50 bg-opacity-40 px-1 shadow backdrop-blur-md md:hidden",
|
||||
isEmbed && "hidden"
|
||||
)}>
|
||||
{mobileNavigationBottomItems.map((item) => (
|
||||
|
|
Loading…
Reference in New Issue