mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
npm packages update
This commit is contained in:
parent
ed507dc39f
commit
32522097c0
51 changed files with 3247 additions and 5187 deletions
36
src/pages/_error.jsx
Normal file
36
src/pages/_error.jsx
Normal file
|
@ -0,0 +1,36 @@
|
|||
function Error({ statusCode }) {
|
||||
const render404 = () => {
|
||||
return (
|
||||
<center>
|
||||
<h1>404</h1>
|
||||
<iframe
|
||||
width="100%"
|
||||
height="465"
|
||||
src="https://www.youtube-nocookie.com/embed/GOzwOeONBhQ"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
/>
|
||||
</center>
|
||||
)
|
||||
}
|
||||
|
||||
if (statusCode === 404) {
|
||||
return render404()
|
||||
} else {
|
||||
return (
|
||||
<p>
|
||||
{statusCode
|
||||
? `An error ${statusCode} occurred on server`
|
||||
: 'An error occurred on client'}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Error.getInitialProps = ({ res, err }) => {
|
||||
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
||||
return { statusCode }
|
||||
}
|
||||
|
||||
export default Error
|
Loading…
Add table
Add a link
Reference in a new issue