Repository navigation
Redirect / to the gallery; delete the roadmap - #54
Merged
Merged
Conversation
Every sign-in path that falls back to '/' landed on the roadmap. The '/' route now redirects to /portals for everyone; the roadmap component is kept, and its sidebar icon is removed.
The root route's beforeLoad runs before the index route's, so a signed-in visitor fetched /me and /token before the index redirect. The redirect now runs first in the root gate. The roadmap moves to src/routes/-roadmap.tsx, which the router plugin's '-' ignore prefix keeps out of the route tree.
redirect() belongs in the beforeLoad of the route being redirected. The root gate treats / as public and no longer redirects it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signing in falls back to
/when there is no other destination: the defaultnextRequestinsrc/routes/login/continue.tsx,safeRedirect's fallback, and the login page's "Continue to KBase" link./rendered the roadmap for a signed-in user./route throwsRoute.redirect({ to: '/portals' })from its ownbeforeLoad, for everyone./is in the root gate's public routes, so the gate makes no/meor/tokenrequest for it..page-herostyles are deleted.Checks
npm run lint,npm run format:check,npm run typecheck,npm run build(no route-tree diff),npx vitest run --dir src: exit 0, 236 tests.index.test.tsxchecks that a signed-in user on/ends on/portals;__root.test.tsxchecks the signed-out case and that/makes no/tokenrequest.