✨ feat(analytics): add cookie consent dialog

This commit is contained in:
2025-05-28 10:32:29 +00:00
parent e0f90d5d87
commit 2547572e1c
14 changed files with 302 additions and 34 deletions
+7 -3
View File
@@ -3,11 +3,15 @@ import { Box, BoxProps, Container, Divider, Typography } from '@mui/material'
import { Footer, Toolbar } from 'components/molecules'
interface PageProps extends BoxProps {
showCookieConsent?: boolean
}
/**
* React function component that implements the default page template.
* @see BoxProps from '@mui/material' for props
*/
const Page: React.FC<BoxProps> = ({ title, children, ...props }) => {
const Page: React.FC<PageProps> = ({ title, children, showCookieConsent, ...props }) => {
React.useEffect(() => {
if (title) {
document.title = `Michele Tartari - ${title}`
@@ -52,12 +56,12 @@ const Page: React.FC<BoxProps> = ({ title, children, ...props }) => {
minHeight: '80vh',
mx: 'auto',
maxWidth: { xs: '100%', md: 'calc(100% - 4em)' },
width: '80em',
width: theme => theme.breakpoints.values.lg,
...props.sx,
}}>
{children}
</Container>
<Footer />
<Footer showCookieConsent={showCookieConsent} />
</Box>
)
}