import {Redirect, Tabs, useRouter} from "expo-router"; import { useSession } from "@/ctx"; import React from "react"; import { AntDesign, Ionicons, MaterialIcons } from "@expo/vector-icons"; import Loading from "../loading"; export default function TabBarLayout() { const { session, isLoading } = useSession(); const router = useRouter() const sizeIcon = 24; // You can keep the splash screen open, or render a loading screen like we do here. if (isLoading) { return ; } // Only require authentication within the (app) group's layout as users // need to be able to access the (auth) group and sign in again. if (!session) { // On web, static rendering will stop here as the user is not authenticated // in the headless Node process that the pages are rendered in. return ; } return ( ( ), }} /> ( ), }} /> ( ), }} /> ( ), }} /> ( ), }} /> ); }