import { Box, Flex, Show } from '@chakra-ui/react'; import { QueryStatus } from '@/components/panel/QueryPanel'; import { useSelfUserQuery } from '@/api/hooks'; import { LoadingPanel } from '@/components/panel/LoadingPanel'; import { Navbar } from '@/components/layout/navbar'; import { Sidebar, SidebarResponsive } from './sidebar'; import { sidebarBreakpoint, navbarBreakpoint } from '@/theme/breakpoints'; import { ReactNode } from 'react'; import { DefaultNavbar } from './navbar/default'; export default function AppLayout({ navbar, children, sidebar, }: { navbar?: ReactNode; children: ReactNode; sidebar?: ReactNode; }) { const query = useSelfUserQuery(); return ( } error="Failed to load user info"> {navbar ?? } {children} ); }