DO NOT MERGE: PR for preview purposes — Litepaper RC#14
DO NOT MERGE: PR for preview purposes — Litepaper RC#14
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/equilibriumco/vanilla-stake/5vQFjYUicR6na2NbwnV1RwnmKfdh |
valstu
left a comment
There was a problem hiding this comment.
Looks fine to me! In case you wouldn't want to remove the existing pages you could also use the new middlewares api of Next.JS to prevent users accessing the other than /litepaper pages.
You could create file called _middleware.ts under pages folder with following content:
import type { NextRequest, NextFetchEvent } from 'next/server';
import { NextResponse as Response } from 'next/server';
export default function middleware(req: NextRequest, ev: NextFetchEvent) {
if (req.nextUrl.pathname !== "/litepaper") {
return Response.redirect("/litepaper");
}
}All the urls would then go to /litepaper.
|
Now that I think of this, we should merge this against some new branch instead of main, something like if (process.env.LITEPAPER_RELEASE !== true) {
return navlinks
} else {
return null
} |
My thinking was that this particular branch would be deployed, and it would not be merged into or nothing would be merged onto it, until the actual release. Release would be deploying the main branch and deleting this one. |
Got it, that makes sense 👍 |
Uh oh!
There was an error while loading. Please reload this page.