mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
fix: redirect when intro modal first time
This commit is contained in:
@@ -574,10 +574,8 @@ function useProtectedRoute(user: UserDto | null, loaded = false) {
|
||||
const inAuthGroup = segments.length > 1 && segments[0] === "(auth)";
|
||||
|
||||
if (!user?.Id && inAuthGroup) {
|
||||
console.log("Redirected to login");
|
||||
router.replace("/login");
|
||||
} else if (user?.Id && !inAuthGroup) {
|
||||
console.log("Redirected to home");
|
||||
router.replace("/(auth)/(tabs)/(home)/");
|
||||
}
|
||||
}, [user, segments, loaded]);
|
||||
|
||||
Reference in New Issue
Block a user