You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
778 B
34 lines
778 B
import { SessionProvider } from "@/ctx";
|
|
import "@/global.css";
|
|
import FontAwesome from "@expo/vector-icons/FontAwesome";
|
|
import { useFonts } from "expo-font";
|
|
import { Slot } from "expo-router";
|
|
import * as SplashScreen from "expo-splash-screen";
|
|
import { useEffect } from "react";
|
|
|
|
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
|
SplashScreen.preventAutoHideAsync();
|
|
|
|
export default function RootLayout() {
|
|
const [loaded] = useFonts({
|
|
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
|
|
...FontAwesome.font,
|
|
});
|
|
|
|
useEffect(() => {
|
|
if (loaded) {
|
|
SplashScreen.hideAsync();
|
|
}
|
|
}, [loaded]);
|
|
|
|
if (!loaded) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<SessionProvider>
|
|
<Slot />
|
|
</SessionProvider>
|
|
);
|
|
}
|