2024-10-15 15:53:05 -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";
|
2024-10-15 08:27:18 -05:00
|
|
|
|
2024-10-18 12:39:54 -05:00
|
|
|
const RootLayout = () => {
|
2024-10-15 15:53:05 -05:00
|
|
|
const [isSignedIn, setIsSignedIn] = useState(false);
|
2024-10-18 13:13:43 -05:00
|
|
|
if (!isSignedIn)
|
|
|
|
return <SignInScreen onSignIn={() => setIsSignedIn(true)} />
|
|
|
|
|
2024-10-15 08:27:18 -05:00
|
|
|
return (
|
2024-10-15 15:53:05 -05:00
|
|
|
<PushNotificationManager>
|
2024-10-15 08:27:18 -05:00
|
|
|
<Stack>
|
|
|
|
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
|
|
|
<Stack.Screen name="+not-found" />
|
|
|
|
</Stack>
|
2024-10-15 15:53:05 -05:00
|
|
|
</PushNotificationManager>
|
2024-10-15 08:27:18 -05:00
|
|
|
);
|
|
|
|
}
|
2024-10-18 12:39:54 -05:00
|
|
|
export default RootLayout;
|