Skip to content

Commit

Permalink
fix client
Browse files Browse the repository at this point in the history
  • Loading branch information
CptnFizzbin committed Aug 11, 2024
1 parent 8a7b665 commit 0e53998
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions packages/client/src/Themes/ZeraDark/Pages/HomePage.tsx
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>
)
}

0 comments on commit 0e53998

Please sign in to comment.