Skip to content

Commit

Permalink
Merge branch 'master' into fix/type-error
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyArt1 authored Jan 6, 2024
2 parents 150a530 + 13ea6f6 commit 6b49684
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
38 changes: 38 additions & 0 deletions public/assets/not-found.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions src/app/[lang]/[...not-found]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use client';

import { useRouter } from 'next/navigation';
import Image from 'next/image';

import { Typography } from '@mui/material';

import NotFound404 from '@public/assets/not-found.svg';

import { TextBody } from '@/components/elements/typography';
import { GridContainer, GridItem } from '@/components/elements/grid';
import { ButtonApp } from '@/components/elements/button';
import { useLanguage } from '@/app/[lang]/provider';

export default function NotFound() {
const router = useRouter();
const { intl } = useLanguage();

return (
<GridContainer>
<GridItem md={12} lg={12}>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<Image
src={NotFound404?.src}
alt="img 404"
width="231"
height="225"
/>
</div>
<br />
<Typography
color="primary"
sx={{
fontSize: '24px',
fontWeight: '700',
textAlign: 'center',
}}
gutterBottom
>
{intl.notFound.title}
</Typography>
<TextBody textCenter gutterBottom>
{intl.notFound.description}
</TextBody>
</GridItem>

<GridItem md={12} lg={12}>
<ButtonApp onClick={() => router.push('/')}>
{intl.notFound.returnHome}
</ButtonApp>
</GridItem>
</GridContainer>
);
}
5 changes: 5 additions & 0 deletions src/dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,10 @@
},
"warnings": {
"breachedPassword": "This password has been in data breaches, so it is not considered safe. We recommend you choose another password."
},
"notFound": {
"title": "Page not found",
"description": "Could not find requested resource",
"returnHome": "Return Home"
}
}
5 changes: 5 additions & 0 deletions src/dictionaries/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,10 @@
},
"warnings": {
"breachedPassword": "Esta contraseña ha estado en filtraciones de datos, por eso no se considera segura. Te recomendamos eligir otra contraseña."
},
"notFound": {
"title": "Página no encontrada",
"description": "No se pudo encontrar el recurso solicitado",
"returnHome": "Volver al inicio"
}
}

0 comments on commit 6b49684

Please sign in to comment.