Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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