create 404.tsx and update index.ts
This commit is contained in:
parent
68aa6637d6
commit
62ec3a05c7
3 changed files with 44 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
build
|
build
|
||||||
node_modules
|
node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
firebase-debug.log
|
||||||
|
|
31
src/public/404.tsx
Normal file
31
src/public/404.tsx
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
import * as ReactDom from "react-dom";
|
||||||
|
import * as React from "react";
|
||||||
|
import TopBar from "./components/TopBar";
|
||||||
|
import { ACTIVE_PAGES } from "./Config";
|
||||||
|
import Splash from "./components/Splash";
|
||||||
|
import Footer from "./components/Footer";
|
||||||
|
|
||||||
|
class Main extends React.Component {
|
||||||
|
constructor() {
|
||||||
|
super({});
|
||||||
|
this.state = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
public render() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<TopBar links={ACTIVE_PAGES}></TopBar>
|
||||||
|
<Splash
|
||||||
|
cta="Page Not Found"
|
||||||
|
delay={2000}
|
||||||
|
backgrounds={["/assets/img/backgrounds/fa21qp.webp"]}
|
||||||
|
></Splash>
|
||||||
|
<Footer></Footer>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ReactDom.render(<Main></Main>, document.getElementById("root"));
|
||||||
|
|
||||||
|
export default {};
|
|
@ -12,6 +12,7 @@ interface Website {
|
||||||
cssfile: string;
|
cssfile: string;
|
||||||
themecolor: string;
|
themecolor: string;
|
||||||
path?: string;
|
path?: string;
|
||||||
|
filename?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const APP = express();
|
const APP = express();
|
||||||
|
@ -53,6 +54,16 @@ const WEBSITES = [
|
||||||
cssfile: "/assets/css/styles.css",
|
cssfile: "/assets/css/styles.css",
|
||||||
themecolor: "",
|
themecolor: "",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
sitename: "404",
|
||||||
|
title: "Page Not Found",
|
||||||
|
description: "404 Page Not Found",
|
||||||
|
jsfile: "/assets/js/404.js",
|
||||||
|
cssfile: "/assets/css/styles.css",
|
||||||
|
themecolor: "",
|
||||||
|
path: "/",
|
||||||
|
filename: "404.html",
|
||||||
|
},
|
||||||
] as Website[];
|
] as Website[];
|
||||||
|
|
||||||
const PORT = process.env.PORT ?? 9000;
|
const PORT = process.env.PORT ?? 9000;
|
||||||
|
@ -118,8 +129,7 @@ function generateFilePages() {
|
||||||
path.join(
|
path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
"../public/",
|
"../public/",
|
||||||
site.path ?? site.sitename,
|
site.filename ?? (site.path ?? site.sitename) + "/index.html"
|
||||||
"/index.html"
|
|
||||||
),
|
),
|
||||||
html
|
html
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue