Skip to content

Commit

Permalink
fix: don't delete projects screen from history (#7787)
Browse files Browse the repository at this point in the history
Fixes a bug in the navigation when you create a project. It used to be
that we'd replace the current entry in the browser history when we
took you to a separate form for it. However, now that we instead
use a dialog, we don't want to replace the history.

Before: if you created a project and navigated back, you'd be taken to
the page you were at BEFORE you went to the projects page, whether
that was in Unleash or otherwise.

Now you'll be taken back to the projects page.
  • Loading branch information
thomasheartman committed Aug 7, 2024
1 parent 29975a6 commit e155cb9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const CreateProjectDialog = ({
try {
const createdProject = await createProject(projectPayload);
refetchUser();
navigate(`/projects/${createdProject.id}`, { replace: true });
navigate(`/projects/${createdProject.id}`);
setToastData({
title: 'Project created',
text: 'Now you can add flags to this project',
Expand Down

0 comments on commit e155cb9

Please sign in to comment.