wavelength_app/app/_layout.tsx

23 lines
661 B
TypeScript
Raw Normal View History

import { Stack } from "expo-router";
import React, { useState } from "react";
import SignInScreen from "@/components/auth/SignInScreen";
import {
PushNotificationManager
} from "@/components/services/notifications/PushNotificationManager";
2024-10-18 12:39:54 -05:00
const 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>
);
}
2024-10-18 12:39:54 -05:00
export default RootLayout;