From 83643a78b73dee5610be6ad9837fb72e9b944cb7 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 28 Aug 2024 15:53:21 +0200 Subject: Initial commit Generated by create-expo-app 3.0.0. --- app/_layout.tsx | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 app/_layout.tsx (limited to 'app/_layout.tsx') diff --git a/app/_layout.tsx b/app/_layout.tsx new file mode 100644 index 0000000..2e37cdd --- /dev/null +++ b/app/_layout.tsx @@ -0,0 +1,37 @@ +import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'; +import { useFonts } from 'expo-font'; +import { Stack } from 'expo-router'; +import * as SplashScreen from 'expo-splash-screen'; +import { useEffect } from 'react'; +import 'react-native-reanimated'; + +import { useColorScheme } from '@/hooks/useColorScheme'; + +// Prevent the splash screen from auto-hiding before asset loading is complete. +SplashScreen.preventAutoHideAsync(); + +export default function RootLayout() { + const colorScheme = useColorScheme(); + const [loaded] = useFonts({ + SpaceMono: require('../assets/fonts/SpaceMono-Regular.ttf'), + }); + + useEffect(() => { + if (loaded) { + SplashScreen.hideAsync(); + } + }, [loaded]); + + if (!loaded) { + return null; + } + + return ( + + + + + + + ); +} -- cgit v1.2.3-18-g5258