Wavelength/app/_layout.tsx

24 lines
664 B
TypeScript
Raw Permalink Normal View History

2024-10-08 16:58:50 -05:00
import { Stack } from "expo-router";
import React, { useState } from 'react';
import SignInScreen from "@/components/auth/SignInScreen";
import { PushNotificationManager }
from "@/components/services/notifications/PushNotificationManager";
export default function RootLayout() {
const [isSignedIn, setIsSignedIn] = useState(false);
if (!isSignedIn) {
return (
<SignInScreen onSignIn={() => setIsSignedIn(true)} />
);
}
return (
<PushNotificationManager>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="+not-found" />
</Stack>
</PushNotificationManager>
);
}