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

fix: replace true on important create screens #6822

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

FredrikOseberg
Copy link
Contributor

This adds replace: true to navigate on the create feature toggle screen and create project screen. This will make it so you don't go back to the form after you have created the resource, replacing the entry in the history with the new url. We can do this in more places, but some of them require a bit more thought. For example when creating a user, you navigate from the admin screen to the user page, and then back to the same screen. Adding { replace: true } in this context makes it so that when you press back you end up on the same screen, because it's recorded twice in history.

Another discussion point:

  • Would you expect the edit screens to also replace the history?

Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview Apr 10, 2024 11:13am
1 Ignored Deployment
Name Status Preview Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Apr 10, 2024 11:13am

Copy link
Contributor

@thomasheartman thomasheartman left a comment

Choose a reason for hiding this comment

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

This looks good to me and I think this is the right way to go in these cases. Thanks 😄

@FredrikOseberg FredrikOseberg merged commit a979ad8 into main Apr 11, 2024
15 checks passed
@FredrikOseberg FredrikOseberg deleted the fix/replace-routes-on-create branch April 11, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants