Skip to content

Commit 7bfa07b

Browse files
committed
fix(clerk-js): Collapse sections after uploading/removing avatars
1 parent 911ccbb commit 7bfa07b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/clerk-js/src/ui/components/OrganizationProfile/ProfileForm.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
6363
.setLogo({ file })
6464
.then(() => {
6565
card.setIdle();
66+
onSuccess?.();
6667
})
6768
.catch(err => handleError(err, [], card.setError));
6869
};
@@ -72,6 +73,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
7273
.setLogo({ file: null })
7374
.then(() => {
7475
card.setIdle();
76+
onSuccess?.();
7577
})
7678
.catch(err => handleError(err, [], card.setError));
7779
};

packages/clerk-js/src/ui/components/UserProfile/ProfileForm.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
7474
.setProfileImage({ file })
7575
.then(() => {
7676
card.setIdle();
77+
onSuccess?.();
7778
})
7879
.catch(err => handleError(err, [], card.setError));
7980
};
@@ -83,6 +84,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
8384
.setProfileImage({ file: null })
8485
.then(() => {
8586
card.setIdle();
87+
onSuccess?.();
8688
})
8789
.catch(err => handleError(err, [], card.setError));
8890
};

0 commit comments

Comments
 (0)