add required login

This commit is contained in:
2025-06-04 20:45:20 +02:00
parent 35efcbe3a8
commit 3bd3b9b70d
5 changed files with 51 additions and 21 deletions

View File

@@ -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>