mirror of
https://github.com/layer-systems/website.git
synced 2026-07-26 14:27:42 +02:00
feat: add dashboard navigation to AccountSwitcher component
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// NOTE: This file is stable and usually should not be modified.
|
||||
// It is important that all functionality in this file is preserved, and should only be modified if explicitly requested.
|
||||
|
||||
import { ChevronDown, LogOut, UserIcon, UserPlus, Wallet, Wifi, X } from 'lucide-react';
|
||||
import { ChevronDown, LayoutDashboard, LogOut, UserIcon, UserPlus, Wallet, Wifi, X } from 'lucide-react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -31,6 +32,7 @@ interface AccountSwitcherProps {
|
||||
|
||||
export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) {
|
||||
const { currentUser, otherUsers, setLogin, removeLogin } = useLoggedInAccounts();
|
||||
const navigate = useNavigate();
|
||||
|
||||
if (!currentUser) return null;
|
||||
|
||||
@@ -71,6 +73,13 @@ export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) {
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
className='flex items-center gap-2 cursor-pointer p-2 rounded-md'
|
||||
onClick={() => navigate('/dashboard')}
|
||||
>
|
||||
<LayoutDashboard className='w-4 h-4' />
|
||||
<span>Dashboard</span>
|
||||
</DropdownMenuItem>
|
||||
<Drawer>
|
||||
<DrawerTrigger asChild>
|
||||
<DropdownMenuItem
|
||||
|
||||
Reference in New Issue
Block a user