add dashboard layout and routing

This commit is contained in:
2025-04-14 20:16:52 +00:00
parent a6ced69393
commit f8e498557e
4 changed files with 115 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { NavLink } from 'react-router-dom';
const navItems = [
{ to: '/', label: 'Reviews', icon: '📋' },
{ to: '/metrics', label: 'Metrics', icon: '📊' },
];
export function Sidebar() {
return (
<aside className="w-64 bg-white border-r border-gray-200 min-h-screen">
<nav className="p-4">
<ul className="space-y-1">
{navItems.map((item) => (
<li key={item.to}>
<NavLink
to={item.to}
end={item.to === '/'}
className={({ isActive }) =>
`flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${
isActive
? 'bg-indigo-50 text-indigo-700'
: 'text-gray-700 hover:bg-gray-100'
}`
}
>
<span>{item.icon}</span>
<span>{item.label}</span>
</NavLink>
</li>
))}
</ul>
</nav>
</aside>
);
}