import { AppShell, Avatar, Box, Burger, Drawer, Flex, Footer, Group, Header, Menu, NavLink, Navbar, Paper, Text, TextInput, ThemeIcon, UnstyledButton, useMantineTheme, } from '@mantine/core'; import { useDisclosure } from '@mantine/hooks'; import { IconAlertTriangle, IconBook2, IconBrandDiscord, IconBrandGithub, IconDashboard, IconGitFork, IconHome, IconLogout, IconMailForward, IconQuestionMark, IconSun, IconUser, IconUserSearch, IconUsers, } from '@tabler/icons-react'; import { signOut } from 'next-auth/react'; import { useTranslation } from 'next-i18next'; import Image from 'next/image'; import Link from 'next/link'; import { ReactNode } from 'react'; import { useScreenLargerThan } from '~/hooks/useScreenLargerThan'; import { usePackageAttributesStore } from '~/tools/client/zustands/usePackageAttributesStore'; import { Logo } from '../Logo'; interface MainLayoutProps { children: ReactNode; } export const MainLayout = ({ children }: MainLayoutProps) => { const { t } = useTranslation(); const { attributes } = usePackageAttributesStore(); const theme = useMantineTheme(); const screenLargerThanMd = useScreenLargerThan('md'); const [burgerMenuOpen, { toggle: toggleBurgerMenu, close: closeBurgerMenu }] = useDisclosure(false); const navigationLinks = ( <> } label="Home" component={Link} href="/manage/" /> } > } label="Manage" component={Link} href="/manage/users" /> } label="Invites" component={Link} href="/manage/users/invites" /> } > } component="a" href="https://homarr.dev/docs/about" label="Documentation" /> } component="a" href="https://github.com/ajnart/homarr/issues/new/choose" label="Report an issue / bug" /> } component="a" href="https://discord.com/invite/aCsmEV5RgA" label="Community Discord" /> } component="a" href="https://github.com/ajnart/homarr" label="Contribute" /> ); return ( <> {navigationLinks} ); };