-
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
8a7b665
commit 0e53998
Showing
1 changed file
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { faArrowRight } from '@fortawesome/free-solid-svg-icons' | ||
import { Button, Paper, Typography } from '@mui/material' | ||
import Stack from '@mui/material/Stack' | ||
import { FC, MouseEventHandler } from 'react' | ||
import { useNavigate } from 'react-router-dom' | ||
|
||
import { AllPostsGallery, FeaturedPostsGallery, FontAwesomeIcon, GalleryTitle } from '../../BaseTheme' | ||
|
||
export const HomePage: FC = () => { | ||
const navigate = useNavigate() | ||
|
||
const onViewFeatured: MouseEventHandler = (event) => { | ||
event.preventDefault() | ||
navigate('/featured') | ||
} | ||
|
||
return ( | ||
<Stack gap={3}> | ||
<Paper> | ||
<Stack direction={'row'} padding={2} gap={1}> | ||
<Typography variant={'h2'} sx={{ flexGrow: 1 }}>Featured</Typography> | ||
|
||
<Button | ||
endIcon={<FontAwesomeIcon icon={faArrowRight} />} | ||
href={'/featured'} | ||
sx={{ typography: 'body1', color: 'text.primary' }} | ||
onClick={onViewFeatured} | ||
> | ||
View All | ||
</Button> | ||
</Stack> | ||
|
||
<FeaturedPostsGallery maxRows={1} /> | ||
</Paper> | ||
|
||
<Paper> | ||
<GalleryTitle>All posts</GalleryTitle> | ||
<AllPostsGallery /> | ||
</Paper> | ||
</Stack> | ||
) | ||
} |