diff --git a/client/src/app/layout/AppHeader.tsx b/client/src/app/layout/AppHeader.tsx index 7a0b734..d3c97de 100644 --- a/client/src/app/layout/AppHeader.tsx +++ b/client/src/app/layout/AppHeader.tsx @@ -146,12 +146,10 @@ export function AppHeader() { )} - {!isAdmin && } + {!isAdmin && } {isAdmin && user && !isMobile && ( - + )} {!isMobile && ( diff --git a/client/src/features/user/user-menu/ui/UserMenu.tsx b/client/src/features/user/user-menu/ui/UserMenu.tsx index fe72a6a..f2dbf7b 100644 --- a/client/src/features/user/user-menu/ui/UserMenu.tsx +++ b/client/src/features/user/user-menu/ui/UserMenu.tsx @@ -9,11 +9,12 @@ import { UserAvatar } from '@/shared/ui/UserAvatar' type Props = { user: AuthUser | null + isAdmin?: boolean onNavigate: (to: string) => void onLogout: () => void } -export function UserMenu({ user, onNavigate, onLogout }: Props) { +export function UserMenu({ user, isAdmin = false, onNavigate, onLogout }: Props) { const [anchorEl, setAnchorEl] = useState(null) const open = Boolean(anchorEl) @@ -63,8 +64,11 @@ export function UserMenu({ user, onNavigate, onLogout }: Props) { > {user ? ( <> - go('/me')}> - + go(isAdmin ? '/admin/settings' : '/me')}> + Выход