import AppTabs from '@/components/app-tabs';
import { useAuth } from '@/utils/auth';
import { router } from 'expo-router';
import React, { useEffect } from 'react';

export default function TabLayout() {
  const { authStatus } = useAuth();

  useEffect(() => {
    if (authStatus === 'fail') {
      router.push('/sign-in');
    }
  }, [authStatus]);


  return authStatus === 'auth' && <AppTabs />;
}
