// ** Next Import
import Link from 'next/link'
import { NextPage } from 'next'
// ** MUI Components
import Button from '@mui/material/Button'
import { styled } from '@mui/material/styles'
import Typography from '@mui/material/Typography'
import Box from '@mui/material/Box'
// ** Layout Import
import BlankLayout from '~/@core/layouts/BlankLayout'
// ** Demo Imports
import FooterIllustrations from '~/views/pages/misc/FooterIllustrations'
// ** Styled Components
const BoxWrapper = styled(Box)(({ theme }) => ({
[theme.breakpoints.down('md')]: {
width: '90vw'
}
}))
const Img = styled('img')(({ theme }) => ({
marginBottom: theme.spacing(10),
[theme.breakpoints.down('lg')]: {
height: 450,
marginTop: theme.spacing(10)
},
[theme.breakpoints.down('md')]: {
height: 400
},
[theme.breakpoints.up('lg')]: {
marginTop: theme.spacing(13)
}
}))
const TreeIllustration = styled('img')(({ theme }) => ({
left: 0,
bottom: '5rem',
position: 'absolute',
[theme.breakpoints.down('lg')]: {
bottom: 0
}
}))
// const Error404: NextPage = () => {
const Error404: any = () => {
return (
// {statusCode // ? `Status code ${statusCode} occurred on server` // : "Status code Unknown/Error occurred on client"} //
// ) // } // interface InitialProps { // res: NextApiResponse // err: NextApiResponse // } // Error.getInitialProps = ({ res, err }: InitialProps) => { // const statusCode = res ? res.statusCode : err ? err.statusCode : 404 // return { statusCode } // } // export default Error // ================================ // APPROACH 2 -- suggested to use NextJS.org example for Data Fetching: getInitialProps // https://nextjs.org/docs/api-reference/data-fetching/get-initial-props#typescript // RESULTS IN ERROR: // Server Error // Error: `pages/404` can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props // import { NextPage, NextPageContext } from 'next' // interface Props { // statusCode?: number // } // const Error: NextPage// {statusCode // ? `Status code ${statusCode} occurred on server` // : "Status code Unknown/Error occurred on client"} //
// ) // Error.getInitialProps = ({ res, err }: NextPageContext) => { // const statusCode = res ? res.statusCode : err ? err.statusCode : 404 // return { statusCode } // } // export default Error