added mainenance mode (#1130)

This commit is contained in:
Yannic Kilcher
2023-02-04 22:37:48 +01:00
committed by GitHub
parent d1b0fab3e1
commit 280979c7b0
2 changed files with 56 additions and 0 deletions
+27
View File
@@ -22,6 +22,33 @@ const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
async redirects() {
if (process.env.MAINTENANCE_MODE !== "true") {
return [];
}
return [
{
source: "/",
destination: "/brb",
permanent: false,
},
{
source: "/dashboard",
destination: "/brb",
permanent: false,
},
{
source: `/tasks/:task`,
destination: "/brb",
permanent: false,
},
{
source: "/leaderboard",
destination: "/brb",
permanent: false,
},
];
},
};
const withBundleAnalyzer = require("@next/bundle-analyzer")({
+29
View File
@@ -0,0 +1,29 @@
import Image from "next/image";
import { CallToAction } from "src/components/CallToAction";
import { Container } from "src/components/Container";
import Roadmap from "src/components/Roadmap";
import Services from "src/components/Services";
import Vision from "src/components/Vision";
export { getDefaultStaticProps as getStaticProps } from "src/lib/default_static_props";
const BrbPage = () => {
return (
<div>
<Container className="">
<div className="grid gap-16 items-center py-20 md:py-40 lg:grid-cols-2">
<div className="m-auto order-2 lg:order-1">
<Image src="/images/logos/logo.png" width={450} height={450} alt="temp-image" />
</div>
<div className="space-y-8 order-1 lg:order-2">
<div>
<h1 className="text-4xl mb-6">Down for maintenance</h1>
</div>
<p className="text-2xl">{"We are improving the service, we'll be back in very few minutes."}</p>
</div>
</div>
</Container>
</div>
);
};
export default BrbPage;