[MOB-27] - Fix deleting library putting you to onboarding (#951)

fix
This commit is contained in:
Utku
2023-06-17 03:44:07 +03:00
committed by GitHub
parent 9a545ae20c
commit 88166cdfdd

View File

@@ -42,7 +42,7 @@ initPlausible({ platformType: 'mobile' });
changeTwTheme('dark');
function AppNavigation() {
const { library } = useClientContext();
const { libraries, library } = useClientContext();
// TODO: Make sure library has actually been loaded by this point - precache with useCachedLibraries?
// if (library === undefined) throw new Error("Tried to render AppNavigation before libraries fetched!")
@@ -54,6 +54,10 @@ function AppNavigation() {
usePlausiblePageViewMonitor({ currentPath });
if (library === null && libraries.data) {
currentLibraryStore.id = libraries.data[0]?.uuid ?? null;
}
return (
<NavigationContainer
ref={navRef}