43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
import { Container, Flex, Heading, Text } from '@chakra-ui/react';
|
|
import { t } from '@/i18n';
|
|
import LinkButton from '../LinkButton';
|
|
|
|
type StatusPageProps = {
|
|
title: string;
|
|
children: ReactNode;
|
|
// Standaard één knop terug naar home
|
|
actions?: ReactNode;
|
|
};
|
|
|
|
// Gedeelde opmaak van de 404- en de foutpagina
|
|
export default function StatusPage({
|
|
title,
|
|
children,
|
|
actions,
|
|
}: StatusPageProps) {
|
|
return (
|
|
<Container
|
|
as="section"
|
|
maxW="2xl"
|
|
pt="pageTop"
|
|
pb={{ base: 16, md: 24 }}
|
|
textAlign="center"
|
|
>
|
|
<Heading as="h1" textStyle="pageTitle" mb={4}>
|
|
{title}
|
|
</Heading>
|
|
<Text color="ink.soft" mb={8}>
|
|
{children}
|
|
</Text>
|
|
<Flex gap={4} justifyContent="center" wrap="wrap">
|
|
{actions ?? (
|
|
<LinkButton to="/" data-testid="status-page-home-link">
|
|
{t('common.actions.backHome')}
|
|
</LinkButton>
|
|
)}
|
|
</Flex>
|
|
</Container>
|
|
);
|
|
}
|