Skip to content

Commit 4a7ce00

Browse files
committed
feat: enhance mobile menu with additional navigation options and improved layout
1 parent d69211b commit 4a7ce00

File tree

1 file changed

+33
-15
lines changed

1 file changed

+33
-15
lines changed

frontend/src/components/common/Header.jsx

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UserCircle, Menu, X, Settings } from "lucide-react";
1+
import { UserCircle, Menu, X, Settings, LayoutDashboard, FileText, Search } from "lucide-react";
22
import { useState, useEffect } from "react";
33
import LogoutButton from "./LogoutButton.jsx";
44
// Notifications removed
@@ -63,8 +63,8 @@ const MobileMenu = ({ isOpen, onClose, navigate, profile }) => (
6363
isOpen ? 'opacity-100 visible' : 'opacity-0 invisible'
6464
}`}>
6565
<div className="absolute inset-0 bg-black/50 backdrop-blur-sm" onClick={onClose}></div>
66-
<div className={`absolute top-0 right-0 h-full w-80 max-w-[85vw] bg-gray-900 border-l border-cyan-500/30
67-
transform transition-transform duration-300 ${
66+
<div className={`absolute top-0 right-0 h-full w-80 max-w-[85vw] bg-gray-900 border-l border-cyan-500/30
67+
transform transition-transform duration-300 flex flex-col ${
6868
isOpen ? 'translate-x-0' : 'translate-x-full'
6969
}`}>
7070
<div className="p-6 border-b border-gray-700">
@@ -79,7 +79,7 @@ const MobileMenu = ({ isOpen, onClose, navigate, profile }) => (
7979
</div>
8080
</div>
8181

82-
<div className="p-6 space-y-6">
82+
<div className="p-6 space-y-6 flex-1 overflow-y-auto">
8383
{/* User Profile */}
8484
<div className="flex items-center space-x-3 p-4 bg-gray-800/50 rounded-lg">
8585
<UserCircle size={48} className="text-cyan-400" />
@@ -89,22 +89,40 @@ const MobileMenu = ({ isOpen, onClose, navigate, profile }) => (
8989
</div>
9090
</div>
9191

92-
{/* Menu Items */}
93-
<div className="space-y-2">
92+
{/* Menu Items (match desktop sidebar) */}
93+
<nav className="space-y-2">
94+
<button
95+
onClick={() => { navigate('/dashboard'); onClose(); }}
96+
className="w-full flex items-center space-x-3 p-3 text-gray-300 hover:text-cyan-400 hover:bg-gray-800/50 rounded-lg transition-colors"
97+
>
98+
<LayoutDashboard size={20} />
99+
<span>Dashboard</span>
100+
</button>
101+
102+
<button
103+
onClick={() => { navigate('/workspace/case-placeholder'); onClose(); }}
104+
className="w-full flex items-center space-x-3 p-3 text-gray-300 hover:text-cyan-400 hover:bg-gray-800/50 rounded-lg transition-colors"
105+
>
106+
<Search size={20} />
107+
<span>Investigation</span>
108+
</button>
109+
110+
<button
111+
onClick={() => { navigate('/reporting'); onClose(); }}
112+
className="w-full flex items-center space-x-3 p-3 text-gray-300 hover:text-cyan-400 hover:bg-gray-800/50 rounded-lg transition-colors"
113+
>
114+
<FileText size={20} />
115+
<span>Reporting</span>
116+
</button>
117+
94118
<button
95-
onClick={() => {
96-
navigate('/settings');
97-
onClose();
98-
}}
99-
className="w-full flex items-center space-x-3 p-3 text-gray-300 hover:text-cyan-400
100-
hover:bg-gray-800/50 rounded-lg transition-colors"
119+
onClick={() => { navigate('/settings'); onClose(); }}
120+
className="w-full flex items-center space-x-3 p-3 text-gray-300 hover:text-cyan-400 hover:bg-gray-800/50 rounded-lg transition-colors"
101121
>
102122
<Settings size={20} />
103123
<span>Settings</span>
104124
</button>
105-
106-
{/* Notifications removed */}
107-
</div>
125+
</nav>
108126

109127
{/* Logout Button */}
110128
<div className="pt-6 border-t border-gray-700 flex justify-center">

0 commit comments

Comments
 (0)