feat: major refactor of navigation

This commit is contained in:
Fredrik Burmester
2024-08-23 16:41:59 +02:00
parent d330dd8db4
commit 725ba1ccaf
27 changed files with 225 additions and 329 deletions

View File

@@ -1,8 +1,3 @@
import {
currentlyPlayingItemAtom,
playingAtom,
showCurrentlyPlayingBarAtom,
} from "@/utils/atoms/playState";
import { Api, Jellyfin } from "@jellyfin/sdk";
import { UserDto } from "@jellyfin/sdk/lib/generated-client/models";
import AsyncStorage from "@react-native-async-storage/async-storage";
@@ -233,7 +228,7 @@ function useProtectedRoute(user: UserDto | null, loading = false) {
if (!user?.Id && inAuthGroup) {
router.replace("/login");
} else if (user?.Id && !inAuthGroup) {
router.replace("/home");
router.replace("/(auth)/(tabs)/(home)/");
}
}, [user, segments, loading]);
}