redesign de la page /admin
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
'use client';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { Home, Settings, Users, FileText, ArrowLeft } from 'lucide-react';
|
||||
import { Settings, ArrowLeft } from 'lucide-react';
|
||||
|
||||
interface NavigationProps {
|
||||
showBackButton?: boolean;
|
||||
@@ -11,11 +11,6 @@ interface NavigationProps {
|
||||
}
|
||||
|
||||
export default function Navigation({ showBackButton = false, backUrl = '/' }: NavigationProps) {
|
||||
const pathname = usePathname();
|
||||
|
||||
const isActive = (path: string) => {
|
||||
return pathname === path;
|
||||
};
|
||||
|
||||
return (
|
||||
<Card className="mb-6 border-0 shadow-sm">
|
||||
@@ -30,36 +25,23 @@ export default function Navigation({ showBackButton = false, backUrl = '/' }: Na
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<div className="flex items-center space-x-1">
|
||||
<Button
|
||||
asChild
|
||||
variant={isActive('/') ? 'default' : 'ghost'}
|
||||
size="sm"
|
||||
>
|
||||
<Link href="/">
|
||||
<Home className="w-4 h-4 mr-2" />
|
||||
Accueil
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
asChild
|
||||
variant={isActive('/admin') ? 'default' : 'ghost'}
|
||||
size="sm"
|
||||
>
|
||||
<Link href="/admin">
|
||||
<Settings className="w-4 h-4 mr-2" />
|
||||
Administration
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
<h1 className="text-xl font-semibold text-slate-900 dark:text-slate-100">
|
||||
Mes Budgets Participatifs - Admin
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<div className="text-sm text-slate-600 dark:text-slate-300">
|
||||
Mes Budgets Participatifs
|
||||
</div>
|
||||
<Button asChild variant="ghost" size="sm">
|
||||
<Link href="/admin/settings">
|
||||
<Settings className="w-4 h-4 mr-2" />
|
||||
Paramètres
|
||||
</Link>
|
||||
</Button>
|
||||
<Button asChild variant="ghost" size="sm">
|
||||
<Link href="/api/auth/signout">
|
||||
Déconnexion
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user