omni-tools/src/components/ToolLayout.tsx

34 lines
692 B
TypeScript
Raw Normal View History

2024-06-22 20:38:03 +01:00
import { Box } from '@mui/material';
import React, { ReactNode } from 'react';
import { Helmet } from 'react-helmet';
import ToolHeader from './ToolHeader';
2024-06-19 21:18:35 +01:00
2024-06-22 20:38:03 +01:00
export default function ToolLayout({
children,
title,
2024-06-23 01:26:04 +01:00
description,
image
2024-06-22 20:38:03 +01:00
}: {
title: string;
description: string;
2024-06-23 01:26:04 +01:00
image?: string;
2024-06-22 20:38:03 +01:00
children: ReactNode;
}) {
return (
<Box
width={'100%'}
display={'flex'}
flexDirection={'column'}
alignItems={'center'}
>
<Helmet>
<title>{`${title} - Omni Tools`}</title>
</Helmet>
<Box width={'85%'}>
2024-06-23 01:26:04 +01:00
<ToolHeader title={title} description={description} image={image} />
2024-06-22 20:38:03 +01:00
{children}
</Box>
</Box>
);
2024-06-19 21:18:35 +01:00
}