Merge pull request #508 from m-tartari/refactor/eror-page/title

♻️ refactor(ErrorPage): use common `SectionHeader`
This commit is contained in:
2025-06-16 17:07:04 +02:00
committed by GitHub
+3 -2
View File
@@ -1,15 +1,16 @@
import { isRouteErrorResponse, useRouteError } from 'react-router-dom' import { isRouteErrorResponse, useRouteError } from 'react-router-dom'
import { Typography } from '@mui/material' import { Typography } from '@mui/material'
import { SectionHeader } from 'components/atoms/index.js'
import { Page } from 'components/templates/index.js' import { Page } from 'components/templates/index.js'
const ErrorPage: React.FC = () => { const ErrorPage: React.FC = () => {
const error: unknown = useRouteError() const error: unknown = useRouteError()
return ( return (
<Page sx={{ display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', minHeight: '90vh' }}> <Page sx={{ display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', minHeight: '90vh' }}>
<Typography variant="h1" color="primary.main"> <SectionHeader variant="h1" component="h1" textTransform="none">
Oops! Oops!
</Typography> </SectionHeader>
<Typography variant="h6">Sorry, an unexpected error has occurred.</Typography> <Typography variant="h6">Sorry, an unexpected error has occurred.</Typography>
{isRouteErrorResponse(error) && ( {isRouteErrorResponse(error) && (
<Typography color="text.secondary"> <Typography color="text.secondary">