You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RootNavigation.js 355B

123456789101112131415
  1. import React, {useContext} from 'react'
  2. import { AuthContext } from '../context/AuthContext'
  3. import AppStack from './AppStack';
  4. import AuthStack from './AuthStack';
  5. const RootNavigation = () => {
  6. const {userInfo} = useContext(AuthContext);
  7. return (
  8. !userInfo.jwt ? <AuthStack /> : <AppStack />
  9. )
  10. }
  11. export default RootNavigation