From 6aede83b39f1050b7528b243278a85e5623856be Mon Sep 17 00:00:00 2001 From: Alberto Duarte Delgado Date: Mon, 30 Mar 2026 14:59:30 +0100 Subject: Integracion Firebase --- src/app/index.tsx | 54 +++++++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) (limited to 'src/app/index.tsx') diff --git a/src/app/index.tsx b/src/app/index.tsx index cf5f7c1..eacde3c 100644 --- a/src/app/index.tsx +++ b/src/app/index.tsx @@ -1,39 +1,27 @@ -import { router } from "expo-router"; -import { Button, Text, View } from "react-native"; -import { SafeAreaView } from "react-native-safe-area-context"; +import { Redirect } from 'expo-router'; +import { ActivityIndicator, View } from 'react-native'; +import { useAuthSession } from '@/providers/AuthProvider'; -export default function Index() { +export default function IndexPage() { + const { user, loading } = useAuthSession(); - - function navegarGuardarPersona(){ - console.log("ir a pantalla") - router.push({ - pathname: "/GuardarPersona", - //params: - }) + if (loading) { + return ( + + + + ); } + if (user) { + return ; + } - function navegarGuardarProducto(){ - console.log("ir a pantalla") - router.push({ - pathname: "/GuardarProducto", - //params: - }) - } - return ( - - -