'use client' import { FC } from 'react' import { Box, Container, Typography } from '@mui/material' import Image from 'next/image' import { PageLayoutProvider } from '../../../providers/PageLayoutProvider' import { useWagtailPagesContext } from '../../../providers/WagtailPagesProvider/context' import { PageType } from '../types' import { ImageBox } from './styled' const StandardPage: FC = ({ children }) => { const { currentPage } = useWagtailPagesContext() return ( {currentPage.featuredImage?.image?.imageSizes?.medium && ( `${src}?w=${width}`} src={currentPage.featuredImage.image.imageSizes.full.imageUrl} alt={currentPage.featuredImage.image.altText ?? ''} style={{ objectFit: 'cover' }} fill /> )} {currentPage.title} {children} ) } export default StandardPage