Update routing logic to redirect users to the dashboard after login and evaluation actions. Refactor middleware to handle public routes and adjust navigation links across the application for improved user experience.
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled

This commit is contained in:
Julien Froidefond
2026-02-20 13:26:53 +01:00
parent b1fb6762fe
commit 328200f8b4
6 changed files with 240 additions and 165 deletions

View File

@@ -212,7 +212,7 @@ export default function EvaluationDetailPage() {
return (
<div className="py-12 text-center font-mono text-xs text-zinc-600 dark:text-zinc-500">
Évaluation introuvable.{" "}
<Link href="/" className="text-cyan-600 dark:text-cyan-400 hover:underline">
<Link href="/dashboard" className="text-cyan-600 dark:text-cyan-400 hover:underline">
dashboard
</Link>
</div>
@@ -391,7 +391,7 @@ export default function EvaluationDetailPage() {
>
soumettre
</button>
<button onClick={() => router.push("/")} className="rounded border border-zinc-300 dark:border-zinc-600 px-3 py-1.5 font-mono text-xs text-zinc-600 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700">
<button onClick={() => router.push("/dashboard")} className="rounded border border-zinc-300 dark:border-zinc-600 px-3 py-1.5 font-mono text-xs text-zinc-600 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700">
dashboard
</button>
<button
@@ -428,7 +428,7 @@ export default function EvaluationDetailPage() {
variant="danger"
onConfirm={async () => {
const res = await fetch(`/api/evaluations/${id}`, { method: "DELETE" });
if (res.ok) router.push("/");
if (res.ok) router.push("/dashboard");
else alert("Erreur lors de la suppression");
}}
onCancel={() => setDeleteConfirmOpen(false)}