This repository has been archived on 2025-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
parandum/src/Error404.js
2021-11-25 09:20:24 +00:00

42 lines
745 B
JavaScript

import React, { useEffect } from 'react';
import NavBar from './NavBar';
import Footer from "./Footer";
import { HomeRounded as HomeRoundedIcon } from "@material-ui/icons";
export default function PageNotFound(props) {
const navbarItems = [
{
type: "link",
link: "/",
icon: <HomeRoundedIcon />,
hideTextMobile: true,
}
];
document.title = "Error 404 | Parandum";
const page = props.page;
useEffect(() => {
if (page) {
page.load();
return () => page.unload();
}
}, [page]);
return (
(typeof page === "undefined" || !page.loaded)
?
<div>
<NavBar items={navbarItems}/>
<main>
<h1>Error 404</h1>
<h3>Sorry, but we can't find that page.</h3>
</main>
<Footer />
</div>
:
null
)
}