import { useCallback } from 'react'; import { useMatch, useResolvedPath } from 'react-router-dom'; import { useTheme } from '@emotion/react'; import { useAuth } from '@/auth/hooks/useAuth'; import { IconColorSwatch, IconLogout, IconSettings, IconUser, IconUsers, } from '@/ui/icon/index'; import NavItem from '@/ui/navbar/components/NavItem'; import NavTitle from '@/ui/navbar/components/NavTitle'; import SubNavbar from '@/ui/navbar/components/SubNavbar'; export function SettingsNavbar() { const theme = useTheme(); const { logout } = useAuth(); const handleLogout = useCallback(() => { logout(); }, [logout]); return ( <> } active={ !!useMatch({ path: useResolvedPath('/settings/profile').pathname, end: true, }) } /> } soon={true} active={ !!useMatch({ path: useResolvedPath('/settings/profile/experience').pathname, end: true, }) } /> } active={ !!useMatch({ path: useResolvedPath('/settings/workspace-members').pathname, end: true, }) } /> } active={ !!useMatch({ path: useResolvedPath('/settings/workspace').pathname, end: true, }) } /> } danger={true} /> ); }