Redirect unauthenticated users to login page instead of home

This commit is contained in:
Aman Varshney
2025-03-23 09:46:11 +05:30
parent d7eefa4d14
commit 9574230b29
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"create-better-t-stack": patch
---
Redirect unauthenticated users to login page instead of home

View File

@@ -17,7 +17,7 @@ function RouteComponent() {
useEffect(() => {
if (!session && !isPending) {
navigate({
to: "/",
to: "/login",
});
}
}, [session, isPending]);