Skip to content

Comments

DO NOT MERGE: PR for preview purposes — Litepaper RC#14

Open
jonijuup wants to merge 5 commits intomainfrom
litepaper-release
Open

DO NOT MERGE: PR for preview purposes — Litepaper RC#14
jonijuup wants to merge 5 commits intomainfrom
litepaper-release

Conversation

@jonijuup
Copy link
Collaborator

@jonijuup jonijuup commented Dec 10, 2021

  • Litepaper Release Candidate
  • Removes nav and other functionalities, except litepaper content.
  • Should end up as an own litepaper-release branch that will not be merged into main at all.

@vercel
Copy link

vercel bot commented Dec 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/equilibriumco/vanilla-stake/5vQFjYUicR6na2NbwnV1RwnmKfdh
✅ Preview: https://vanilla-stake-git-litepaper-release-equilibriumco.vercel.app

Copy link
Collaborator

@valstu valstu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@valstu
Copy link
Collaborator

valstu commented Dec 13, 2021

Now that I think of this, we should merge this against some new branch instead of main, something like litepaper-release so the main branch wouldn't get messy because of the removals. Or if we want to merge against the main branch then we could bring the pages back and just add the middleware.ts file. Then the navigation items could be brought back as well and we could render then based on some feature flag like environment variable

if (process.env.LITEPAPER_RELEASE !== true) {
  return navlinks
} else {
  return null
}

@jonijuup
Copy link
Collaborator Author

jonijuup commented Dec 13, 2021

Now that I think of this, we should merge this against some new branch instead of main, something like litepaper-release so the main branch wouldn't get messy because of the removals. Or if we want to merge against the main branch then we could bring the pages back and just add the middleware.ts file. Then the navigation items could be brought back as well and we could render then based on some feature flag like environment variable

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.

@valstu
Copy link
Collaborator

valstu commented Dec 13, 2021

Now that I think of this, we should merge this against some new branch instead of main, something like litepaper-release so the main branch wouldn't get messy because of the removals. Or if we want to merge against the main branch then we could bring the pages back and just add the middleware.ts file. Then the navigation items could be brought back as well and we could render then based on some feature flag like environment variable

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants