feat: add account settings route and user menu dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,14 @@ export function Layout() {
|
||||
return { label };
|
||||
});
|
||||
|
||||
const userMenuItems = [
|
||||
{
|
||||
label: 'Account Settings',
|
||||
icon: <Settings size={14} />,
|
||||
onClick: () => navigate('/settings/account'),
|
||||
},
|
||||
];
|
||||
|
||||
const sidebar = (
|
||||
<Sidebar collapsed={false} onCollapseToggle={() => {}}>
|
||||
<Sidebar.Header
|
||||
@@ -249,6 +257,7 @@ export function Layout() {
|
||||
<TopBar
|
||||
breadcrumb={breadcrumb}
|
||||
user={username ? { name: username } : undefined}
|
||||
userMenuItems={userMenuItems}
|
||||
onLogout={logout}
|
||||
/>
|
||||
<Outlet />
|
||||
|
||||
@@ -27,6 +27,7 @@ import { TeamPage } from './pages/tenant/TeamPage';
|
||||
import { SettingsPage } from './pages/tenant/SettingsPage';
|
||||
import { TenantAuditPage } from './pages/tenant/TenantAuditPage';
|
||||
import { OnboardingPage } from './pages/OnboardingPage';
|
||||
import { AccountSettingsPage } from './pages/AccountSettingsPage';
|
||||
|
||||
function LandingRedirect() {
|
||||
const scopes = useScopes();
|
||||
@@ -135,6 +136,9 @@ export function AppRouter() {
|
||||
<Route path="/tenant/audit" element={<TenantAuditPage />} />
|
||||
<Route path="/tenant/settings" element={<SettingsPage />} />
|
||||
|
||||
{/* Account settings — accessible to any authenticated user */}
|
||||
<Route path="settings/account" element={<AccountSettingsPage />} />
|
||||
|
||||
{/* Default redirect — vendor goes to /vendor/tenants, customer to /tenant */}
|
||||
<Route index element={<LandingRedirect />} />
|
||||
</Route>
|
||||
|
||||
Reference in New Issue
Block a user