add required login
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { Stack } from "expo-router";
|
||||
import { Stack, Redirect } from "expo-router";
|
||||
import "@/global.css";
|
||||
import { GluestackUIProvider } from "@/components/ui/gluestack-ui-provider";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { useEffect } from "react";
|
||||
import { useNoticesStore } from "@/store/noticesStore";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useNoticesStore } from "@/store/noticesStore";
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
export default function RootLayout() {
|
||||
@@ -12,9 +12,11 @@ export default function RootLayout() {
|
||||
useEffect(() => {
|
||||
fetchNotices();
|
||||
}, []);
|
||||
return (
|
||||
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<GluestackUIProvider>
|
||||
|
||||
<Stack
|
||||
screenOptions={{
|
||||
headerTintColor: "#1c1c1e",
|
||||
@@ -23,6 +25,12 @@ export default function RootLayout() {
|
||||
}}
|
||||
>
|
||||
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
||||
<Stack.Screen
|
||||
name="(auth)/login"
|
||||
options={{ headerShown: false }}/>
|
||||
<Stack.Screen
|
||||
name="registration"
|
||||
options={{ headerShown: false }}/>
|
||||
</Stack>
|
||||
</GluestackUIProvider>
|
||||
</QueryClientProvider>
|
||||
|
||||
Reference in New Issue
Block a user