Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Not Found page #1566

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/client/campaigns/InlineDonation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const StyledGrid = styled(Grid)(({ theme }) => ({
textAlign: 'center',

'&:hover': {
'text-decoration': 'underline',
textDecoration: 'underline',
transform: 'scale(1.01)',
cursor: 'pointer',
transition: 'all 0.3s ease',
Expand Down
2 changes: 1 addition & 1 deletion src/components/client/layout/Footer/Footer.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const SubscribeLinkWrapper = styled(Grid)(({ theme }) => ({
},

'&:hover': {
'text-decoration': 'underline',
textDecoration: 'underline',
transform: 'scale(1.03)',
cursor: 'pointer',
transition: 'all 0.3s ease',
Expand Down
53 changes: 0 additions & 53 deletions src/components/common/errors/NotFoundPage.tsx

This file was deleted.

20 changes: 20 additions & 0 deletions src/components/common/errors/NotFoundPage/NotFoundPage.styled.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Stack, Typography } from '@mui/material'
import { styled } from '@mui/material/styles'

import LinkButton from 'components/common/LinkButton'
import theme from 'common/theme'

export const Root = styled(Stack)(() => ({
alignItems: 'center',
gap: theme.spacing(5),
marginTop: theme.spacing(8),
}))

export const ErrorMessage = styled(Typography)(() => ({
maxWidth: theme.spacing(80),
}))

export const BackButton = styled(LinkButton)(() => ({
color: theme.palette.primary.dark,
borderColor: theme.palette.primary.dark,
}))
31 changes: 31 additions & 0 deletions src/components/common/errors/NotFoundPage/NotFoundPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { useTranslation } from 'next-i18next'
import { Grid } from '@mui/material'
import ArrowBackIcon from '@mui/icons-material/ArrowBack'

import { routes } from 'common/routes'
import Layout from 'components/client/layout/Layout'
import NotFoundIllustration from '../assets/NotFoundIllustration'

import { BackButton, ErrorMessage, Root } from './NotFoundPage.styled'

export default function NotFoundPage() {
const { t } = useTranslation('common')

return (
<Layout>
<Root>
<Grid container item xs={12} sm={7} lg={5}>
<NotFoundIllustration />
</Grid>
<ErrorMessage variant="body2">{t('errors.404Message')}</ErrorMessage>
<BackButton
size="large"
startIcon={<ArrowBackIcon />}
variant="outlined"
href={routes.index}>
{t('errors.backButtonLabel')}
</BackButton>
</Root>
</Layout>
)
}
2 changes: 1 addition & 1 deletion src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GetStaticProps } from 'next'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'

import NotFoundPage from 'components/common/errors/NotFoundPage'
import NotFoundPage from 'components/common/errors/NotFoundPage/NotFoundPage'

export const getStaticProps: GetStaticProps = async ({ locale }) => ({
props: {
Expand Down
Loading