feat(login): add redirect parameter to login links for better user experience

This commit is contained in:
hamed
2026-07-12 10:06:15 +03:30
parent 42ac6645d5
commit 58f05f8f4f
4 changed files with 121 additions and 5 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ export default async function Dashboard({ searchParams }) {
if (!ability.can("access", "Dashboard") || !token) {
removeToken();
return redirect("/login");
return redirect("/login?redirect=/dashboard");
}
// The userInfo cookie holds the real user uuid; the standalone `uuid` cookie