diff --git a/frontend/src/component/feature/CreateFeature/CreateFeature.tsx b/frontend/src/component/feature/CreateFeature/CreateFeature.tsx index 51e7ef0704..bca2636e0b 100644 --- a/frontend/src/component/feature/CreateFeature/CreateFeature.tsx +++ b/frontend/src/component/feature/CreateFeature/CreateFeature.tsx @@ -67,7 +67,9 @@ const CreateFeature = () => { const payload = getTogglePayload(); try { await createFeatureToggle(project, payload); - navigate(`/projects/${project}/features/${name}`); + navigate(`/projects/${project}/features/${name}`, { + replace: true, + }); setToastData({ title: 'Toggle created successfully', text: 'Now you can start using your toggle.', diff --git a/frontend/src/component/project/Project/CreateProject/CreateProject.tsx b/frontend/src/component/project/Project/CreateProject/CreateProject.tsx index 91afdcd7c9..a9b5e6c528 100644 --- a/frontend/src/component/project/Project/CreateProject/CreateProject.tsx +++ b/frontend/src/component/project/Project/CreateProject/CreateProject.tsx @@ -58,7 +58,7 @@ const CreateProject = () => { try { await createProject(payload); refetchUser(); - navigate(`/projects/${projectId}`); + navigate(`/projects/${projectId}`, { replace: true }); setToastData({ title: 'Project created', text: 'Now you can add toggles to this project',