From fe6cbcc72b7350c5af97ea7f295ef99dfa815cb6 Mon Sep 17 00:00:00 2001 From: Raquel Smith Date: Fri, 25 Oct 2024 13:12:11 -0700 Subject: [PATCH] fix: switch to the project after creation (#25834) --- frontend/src/scenes/projectLogic.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/scenes/projectLogic.ts b/frontend/src/scenes/projectLogic.ts index 8712f9d4d8279..9e67d253db5ad 100644 --- a/frontend/src/scenes/projectLogic.ts +++ b/frontend/src/scenes/projectLogic.ts @@ -19,7 +19,7 @@ export const projectLogic = kea([ deleteProjectFailure: true, }), connect(() => ({ - actions: [userLogic, ['loadUser']], + actions: [userLogic, ['loadUser', 'switchTeam']], })), reducers({ projectBeingDeleted: [ @@ -101,6 +101,11 @@ export const projectLogic = kea([ deleteProjectSuccess: () => { lemonToast.success('Project has been deleted') }, + createProjectSuccess: ({ currentProject }) => { + if (currentProject) { + actions.switchTeam(currentProject.id) + } + }, })), afterMount(({ actions }) => { const appContext = getAppContext()