-
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
1 parent
78c7594
commit 1aea544
Showing
7 changed files
with
149 additions
and
115 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
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,10 +1,37 @@ | ||
import { Grid, GridItem, Box } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
import { Header2 } from '../../components/Header'; | ||
import DefaultLayout from '../../components/Layouts/Default'; | ||
import LoggedIn from '../../components/LoggedIn'; | ||
import LoggedOut from '../../components/LoggedOut'; | ||
import { useAuth } from '../../context/authContext/AuthContext'; | ||
|
||
const Home: React.FC = () => { | ||
const { user } = useAuth(); | ||
return <>{user ? <LoggedIn /> : <LoggedOut />}</>; | ||
return ( | ||
<> | ||
{user ? ( | ||
<DefaultLayout> | ||
<LoggedIn /> | ||
</DefaultLayout> | ||
) : ( | ||
<Grid | ||
templateColumns="1fr" | ||
templateRows="0.4fr 1fr" | ||
templateAreas='"header" "main"' | ||
h="100vh" | ||
> | ||
<GridItem gridArea="header"> | ||
<Header2 /> | ||
</GridItem> | ||
<GridItem gridArea="main"> | ||
<Box h="100%"> | ||
<LoggedOut /> | ||
</Box> | ||
</GridItem> | ||
</Grid> | ||
)} | ||
</> | ||
); | ||
}; | ||
export default Home; |
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
Oops, something went wrong.
1aea544
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: