Skip to content

Commit db643c8

Browse files
fix(site): redirect to new organization after create (#26890) (#26930)
Backport of #26890 Original PR: #26890 — fix(site): redirect to new organization after create Merge commit: 3e0875d Requested by: @aslilac Co-authored-by: McKayla はな <mckayla@hey.com>
1 parent 94a997d commit db643c8

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

site/src/pages/OrganizationSettingsPage/CreateOrganizationPage.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,11 @@ const CreateOrganizationPage: FC = () => {
2727
error={error}
2828
isEntitled={feats.multiple_organizations}
2929
onSubmit={async (values) => {
30-
await createOrganizationMutation.mutateAsync(values, {
31-
onSuccess: () => {
32-
toast.success(
33-
`Organization "${values.name}" created successfully.`,
34-
);
35-
navigate(`/organizations/${values.name}`);
36-
},
37-
});
30+
await createOrganizationMutation.mutateAsync(values);
31+
toast.success(
32+
`Organization "${values.name}" created successfully.`,
33+
);
34+
navigate(`/organizations/${values.name}`);
3835
}}
3936
/>
4037
</RequirePermission>

0 commit comments

Comments
 (0)