I'm currently working on enhancing my website by adding a custom error page specifically for when javascript is disabled. I've already implemented a component within _document.js
<body>
<noscript>
<ErrorPage />
</noscript>
</body>
Here is how the Error Page component is defined:
function ErrorPage() {
const requiredMsg = 'Javascript Required'
const errorText = 'We’re sorry, but the page does not work without JavaScript enabled. Please enable JavaScript on your browser.'
return (
<div style={{ width: '100%', textAlign: 'center' }} >
<img style={{ width: '100%' }} src={ 'img.svg' } />
<Typography component='h1' style={{ fontFamily: 'lato, sans-serif', color: '#1074C3' }}>{requiredMsg}</Typography>
</div>
)
}
export default ErrorPage
The current design looks good, but I want to enhance it with some media-specific styling and elements. Specifically, I want the page to take up the entire space in mobile view, while in desktop view, it should only occupy the middle 200px height with a faded background for rest of the area. Is it possible to achieve this? If so, how can it be done?