import { BrowserRouter, Routes, Route, Outlet, Navigate } from 'react-router-dom'; import { Landing } from 'screens/landing/Landing.web'; import { useAppConfiguration, useResponsiveLayout, useSession, useSettings } from 'hooks'; import { AdminProfile, Dashboard, NotFound, Rooms, Inbox } from 'screens'; import { SideBar, TopBar } from 'components/dashboard'; import { metrics } from 'config'; import { Container, SafeScreen, Visible } from 'components'; import { Room } from 'screens/room'; import { FullScreen } from 'components/calling'; import { isHideSideBarVar, isRoomPageVar } from 'state-management/settings'; import { useReactiveVar } from '@apollo/client'; import { PortalProvider } from '@gorhom/portal'; import { DialogProvider } from 'context/dialog'; import { isLoggedInVar } from 'state-management/session'; import { PATH_PAGES } from './web'; import { Auth } from './guards'; const { STYLES } = metrics; const NavigationWrapper = () => { return ; }; export function Navigation() { const { isSideBarOpen, isSideBarCollapsed } = useSettings(); const { isDesktop } = useResponsiveLayout(); const { loadingSession } = useSession(); const isLoggedIn = useReactiveVar(isLoggedInVar); const { loading } = useAppConfiguration(); const isRoomPage = useReactiveVar(isRoomPageVar); const isHideSideBar = useReactiveVar(isHideSideBarVar); const isRoomPageOpen = isLoggedIn && isRoomPage; const isDesktopSideBarClose = isLoggedIn && isDesktop && !isSideBarOpen; const isCallActive = false; const isDesktopClosed = isDesktopSideBarClose ? STYLES.sideBarWidth : 0; const isRoomPageOpened = isRoomPageOpen ? 0 : isDesktopClosed; const sideBarCollapsed = isSideBarCollapsed ? STYLES.sideBarCollapseWidth : isRoomPageOpened; const ml = isHideSideBar ? 0 : sideBarCollapsed; if (loadingSession || loading) { return ; } return ( <> }> } /> } /> } /> } /> } /> } /> } /> } /> } /> ); }