-
Notifications
You must be signed in to change notification settings - Fork 202
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
refactor(explorer): move explorer routes into its own route group #3100
Conversation
|
I had some concerns about using import path aliases to avoid all the Hopefully means we can go back to that in the future! |
needs more work for cases when you load this up with no world address gonna defer this for now |
const pathname = request.nextUrl.pathname; | ||
const worldAddress = process.env.WORLD_ADDRESS; | ||
|
||
if ((pathname === "/" || pathname === "/worlds") && worldAddress) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand, this was probably removed in favor of redirects within pages in order not to mess with other routes that are not part of worlds/*
, or are there other reasons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this and it helps render the styled 404 page for routes within explorer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which ones should valid routes moving forward, and which ones 404?
At the moment it's:
/
->/worlds
/worlds
->/worlds/${worldAddress}
- Which are the new routes, any redirects?
- Everything else 404s?
Just asking so I can give some more thought on how to best handle redirects.
I wanna use a new route group for some internal stuff that shouldn't inherit the base layout.tsx and apparently need to move things into route groups to "opt out" of a layout.