chore: refactor

This commit is contained in:
Fredrik Burmester
2024-08-07 08:15:30 +02:00
parent d4d3cbbc43
commit 49b2e594d6
31 changed files with 525 additions and 487 deletions

View File

@@ -6,13 +6,17 @@ import { useEffect, useRef } from "react";
import "react-native-reanimated";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { Provider as JotaiProvider } from "jotai";
import { Provider as JotaiProvider, useAtom } from "jotai";
import { JellyfinProvider } from "@/providers/JellyfinProvider";
import { TouchableOpacity } from "react-native";
import Feather from "@expo/vector-icons/Feather";
import { StatusBar } from "expo-status-bar";
import { Ionicons } from "@expo/vector-icons";
import { View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { Text } from "@/components/common/Text";
import { runningProcesses } from "@/utils/atoms/downloads";
// Prevent the splash screen from auto-hiding before asset loading is complete.
SplashScreen.preventAutoHideAsync();
@@ -37,7 +41,7 @@ export default function RootLayout() {
retryOnMount: true,
},
},
})
}),
);
useEffect(() => {
@@ -46,6 +50,10 @@ export default function RootLayout() {
}
}, [loaded]);
const insets = useSafeAreaInsets();
const [process] = useAtom(runningProcesses);
if (!loaded) {
return null;
}