Last active
September 4, 2022 17:37
-
-
Save antonkalik/c1230b904571bfe993905a515cf52cfc to your computer and use it in GitHub Desktop.
The wrapper for routes
This file contains hidden or 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
const MainLayout = ({ navigate }) => { | |
const session = useSession(); | |
return ( | |
<StyledMainLayout> | |
{!session.loading ? ( | |
<div> | |
<Navigation session={session} navigate={navigate} /> | |
<StyledContainer isLoggedIn={!!session.data}> | |
<Outlet context={session} /> | |
</StyledContainer> | |
</div> | |
) : ( | |
<Loading /> | |
)} | |
<Footer /> | |
</StyledMainLayout> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment