import * as React from 'react'
import {
  defineMessages, useIntl,
} from 'react-intl'

const m = defineMessages({ notFound: { defaultMessage: 'The page you requested is not found.' } })

function Status404({ staticContext }: { staticContext?: { status?: number } }) {
  const { formatMessage } = useIntl()
  if (staticContext) staticContext.status = 404
  return <p className="container">{formatMessage(m.notFound)}</p>
}

export default Status404
