diff --git a/website/next.config.js b/website/next.config.js index 19ec09b2..705c3b5d 100644 --- a/website/next.config.js +++ b/website/next.config.js @@ -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")({ diff --git a/website/src/pages/brb.tsx b/website/src/pages/brb.tsx new file mode 100644 index 00000000..a62bdcb4 --- /dev/null +++ b/website/src/pages/brb.tsx @@ -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 ( +
{"We are improving the service, we'll be back in very few minutes."}
+