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

[legacy-framework] Allow using Route Manifest for Page.redirectAuthenticatedTo #2243

Merged
merged 4 commits into from May 17, 2021

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Apr 20, 2021

What are the changes and their implications?

Allow devs to use Url Object for redirectAuthenticatedTo

- LoginPage.redirectAuthenticatedTo = Routes.DashboardPage().pathname
+ LoginPage.redirectAuthenticatedTo = Routes.DashboardPage()

Bug Checklist

  • Integration test added (see test docs if needed)

Feature Checklist

@Skn0tt
Copy link
Member Author

Skn0tt commented Apr 20, 2021

@flybayer
Copy link
Member

Thanks @Skn0tt! Can you update our docs to include this feature?

Skn0tt added a commit to blitz-js/blitzjs.com that referenced this pull request May 14, 2021
@flybayer flybayer changed the title Allow RouteUrlObject for redirectAuthenticatedTo Allow using Route Manifest for Page.redirectAuthenticatedTo May 17, 2021
@flybayer flybayer merged commit a535b7f into canary May 17, 2021
@flybayer flybayer deleted the allow-routeurlobject-for-redirectAuthenticatedTo branch May 17, 2021 22:29
@blitzjs-bot blitzjs-bot moved this from In Review to Done in Dashboard May 17, 2021
@erikshestopal
Copy link

@Skn0tt I have some routes that require query params from a session for example in order to redirect. Is this currently possible?

// ideal state
Page.redirectedAuthenticatedTo = (session: Session) => Routes.TeamPage({ slug: session.teamName })

cc @flybayer

@Skn0tt
Copy link
Member Author

Skn0tt commented May 19, 2021

Not at the moment, but I guess it should be possible. WDYT @flybayer?

@flybayer
Copy link
Member

I think that should work. We just have to make sure we account for the fact that session is empty on first render.

@dillondotzip dillondotzip changed the title Allow using Route Manifest for Page.redirectAuthenticatedTo [legacy-framework] Allow using Route Manifest for Page.redirectAuthenticatedTo Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants