diff --git a/src/views/components/NavBar.jsx b/src/views/components/NavBar.jsx index deb83b8..24fe053 100644 --- a/src/views/components/NavBar.jsx +++ b/src/views/components/NavBar.jsx @@ -103,8 +103,19 @@ import Z_INDEX from '../../constants/zIndex' import { useResource } from '../../queries/ResourceQueries' import { apiClient } from '../../utils/ApiClient' -const publicPages = ['/landing', '/privacy', '/terms'] -const NavBar = () => { +const publicPages = [ + '/landing', + '/privacy', + '/terms', + 'login', + '/signup', + '/auth/oauth2', + '/forgot-password', + '/login/settings', + '/', +] + +const AppNavBar = () => { const { data: resource } = useResource() const navigate = useNavigate() @@ -165,15 +176,7 @@ const NavBar = () => { ) } - if ( - [ - '/signup', - '/login', - '/auth/oauth2', - '/forgot-password', - '/login/settings', - ].includes(location.pathname) - ) { + if (publicPages.includes(location.pathname)) { return ( // no navbar but show the safe area padding
{ ) } +const LandingNavBar = () => { + return null +} + +const NavBar = () => { + // if capacitor app then show AppNavBar, else show LandingNavBar + if (Capacitor.isNativePlatform()) { + return + } + if (publicPages.includes(window.location.pathname)) { + return + } + return +} + export default NavBar