import FontAwesome from "@expo/vector-icons/FontAwesome"; import { useFonts } from "expo-font"; import { Stack } from "expo-router"; import { Image } from "expo-image"; import * as SplashScreen from "expo-splash-screen"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { useEffect } from "react"; import { View, FlatList, ScrollView } from "react-native"; import { cssInterop, remapProps } from "nativewind"; import "../global.css"; import "react-native-reanimated"; // component interops for nativewind - just need these once cssInterop(Image, { className: "style" }); remapProps(FlatList, { className: "style", contentContainerClassName: "contentContainerStyle", }); remapProps(ScrollView, { className: "style", contentContainerClassName: "contentContainerStyle", }); export { // Catch any errors thrown by the Layout component. ErrorBoundary, } from "expo-router"; export const unstable_settings = { // Ensure that reloading on `/modal` keeps a back button present. initialRouteName: "(tabs)", }; // Prevent the splash screen from auto-hiding before asset loading is complete. SplashScreen.preventAutoHideAsync(); export default function RootLayout() { const [loaded, error] = useFonts({ SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"), ...FontAwesome.font, }); // Expo Router uses Error Boundaries to catch errors in the navigation tree. useEffect(() => { if (error) throw error; }, [error]); useEffect(() => { if (loaded) { SplashScreen.hideAsync(); } }, [loaded]); if (!loaded) { return null; } return ; } function RootLayoutNav() { const queryClient = new QueryClient(); return ( ); }