diff --git a/src/components/templates/Page/Page.tsx b/src/components/templates/Page/Page.tsx new file mode 100644 index 0000000..7e2db23 --- /dev/null +++ b/src/components/templates/Page/Page.tsx @@ -0,0 +1,39 @@ +import React from 'react' +import { Box, BoxProps, Container, Typography } from '@mui/material' + +import { Footer, Toobar } from 'components/molecules' + +/** + * React function component that implements the default page template. + * @see BoxProps from '@mui/material' for props + */ +const Page: React.FC = ({ title, children, ...props }) => { + React.useEffect(() => { + if (title) { + document.title = `Michele Tartari - ${title}` + } + }, [title]) + + return ( + + + + {/* Children is included in props */} + {title && ( + <> + + {title} + + + )} + {children} + +