✨ feat(analytics): add cookie consent dialog
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user