fix: move AdminScopeToggle from NavDrawer to main header bar
Places the scope toggle next to the UserMenu avatar in the top-right header area so it's always visible without opening the nav drawer.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import { X, Home, BarChart2, BookOpen, Download, ShieldCheck, Settings, Ticket } from 'lucide-react';
|
||||
import { useAuth } from '../contexts/AuthContext';
|
||||
import AdminScopeToggle from './AdminScopeToggle';
|
||||
|
||||
const NAV_ITEMS = [
|
||||
{ id: 'home', label: 'Home', icon: Home, color: '#0EA5E9', description: 'Main dashboard' },
|
||||
@@ -64,12 +63,6 @@ export default function NavDrawer({ isOpen, onClose, currentPage, onNavigate })
|
||||
|
||||
{/* Nav items */}
|
||||
<nav style={{ display: 'flex', flexDirection: 'column', gap: '0.375rem' }}>
|
||||
|
||||
{/* Admin scope toggle — between header and nav items */}
|
||||
<div style={{ marginBottom: '0.5rem' }}>
|
||||
<AdminScopeToggle />
|
||||
</div>
|
||||
|
||||
{NAV_ITEMS.map(({ id, label, icon: Icon, color, description }) => {
|
||||
const active = currentPage === id;
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user