6bd1dc8358
Release APK / build (push) Has been cancelled
SplashScreen.hideAsync() and the splash section in app.json were both introduced after v0.1.5 and are common to every crashing build. Reverting to the exact v0.1.5 baseline to isolate the crash source. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import { useEffect } from "react";
|
|
import { Stack, router } from "expo-router";
|
|
import { StatusBar } from "expo-status-bar";
|
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
import "../global.css";
|
|
import { Colors } from "@/constants/theme";
|
|
import { useSettings } from "@/hooks/useSettings";
|
|
|
|
export default function RootLayout() {
|
|
const { settings, ready } = useSettings();
|
|
|
|
useEffect(() => {
|
|
if (!ready) return;
|
|
if (!settings.onboardingDone) {
|
|
router.replace("/onboarding");
|
|
}
|
|
}, [ready, settings.onboardingDone]);
|
|
|
|
return (
|
|
<GestureHandlerRootView style={{ flex: 1, backgroundColor: Colors.bg }}>
|
|
<StatusBar style="light" />
|
|
<Stack
|
|
screenOptions={{
|
|
headerStyle: { backgroundColor: Colors.surface },
|
|
headerTintColor: Colors.text1,
|
|
headerTitleStyle: { color: Colors.text1 },
|
|
contentStyle: { backgroundColor: Colors.bg },
|
|
animation: "slide_from_right",
|
|
}}
|
|
>
|
|
<Stack.Screen name="index" options={{ title: "SheetHappens" }} />
|
|
<Stack.Screen name="new" options={{ title: "New Incident", presentation: "modal" }} />
|
|
<Stack.Screen name="incident/[id]" options={{ title: "Incident" }} />
|
|
<Stack.Screen name="settings" options={{ title: "Settings" }} />
|
|
<Stack.Screen name="onboarding" options={{ headerShown: false }} />
|
|
</Stack>
|
|
</GestureHandlerRootView>
|
|
);
|
|
}
|