-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ryan Saperstein
committed
Dec 5, 2024
1 parent
6ab1297
commit 1225b27
Showing
9 changed files
with
10,010 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import React from 'react'; | ||
import { useAuth } from "../context/AuthContext"; | ||
import TabNavigator from "./BottomTabs"; | ||
import LoginNavigator from "./LoginNavigator"; | ||
import { useAuth } from '../context/AuthContext'; | ||
import TabNavigator from './BottomTabs'; | ||
import LoginNavigator from './LoginNavigator'; | ||
|
||
// Navigates user to the log in screen if seesion is not found (i.e. user not logged in) | ||
export default function RootNavigator() { | ||
const { session, isLoading } = useAuth(); | ||
const { session, isLoading } = useAuth(); | ||
|
||
if (isLoading) { | ||
return null; // or some loading screen (maybe we make in future?) | ||
} | ||
if (isLoading) { | ||
return null; // or some loading screen (maybe we make in future?) | ||
} | ||
|
||
return session ? <TabNavigator /> : <LoginNavigator />; | ||
} | ||
return session ? <TabNavigator /> : <LoginNavigator />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.