import React, {useContext} from 'react';
import AuthStack from './AuthStack';
import UnauthStack from './UnauthStack';
import {AuthContext} from '../store/AuthContext';

export default function RootNavigation() {
  const authCtx = useContext(AuthContext);
  return authCtx.isAuthenticated == false ? <UnauthStack /> : <AuthStack />;
  //   return user ? <UserStack /> : <AuthStack />;
}
