Skip to content

Commit

Permalink
fix: switch to the project after creation (#25834)
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelmsmith authored Oct 25, 2024
1 parent db1e4ad commit fe6cbcc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/scenes/projectLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const projectLogic = kea<projectLogicType>([
deleteProjectFailure: true,
}),
connect(() => ({
actions: [userLogic, ['loadUser']],
actions: [userLogic, ['loadUser', 'switchTeam']],
})),
reducers({
projectBeingDeleted: [
Expand Down Expand Up @@ -101,6 +101,11 @@ export const projectLogic = kea<projectLogicType>([
deleteProjectSuccess: () => {
lemonToast.success('Project has been deleted')
},
createProjectSuccess: ({ currentProject }) => {
if (currentProject) {
actions.switchTeam(currentProject.id)
}
},
})),
afterMount(({ actions }) => {
const appContext = getAppContext()
Expand Down

0 comments on commit fe6cbcc

Please sign in to comment.