Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/three-zebras-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Improve avatar upload and removal UX to auto collapse the profile section upon successful save.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
.setLogo({ file })
.then(() => {
card.setIdle();
onSuccess?.();
})
.catch(err => handleError(err, [], card.setError));
};
Expand All @@ -72,6 +73,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
.setLogo({ file: null })
.then(() => {
card.setIdle();
onSuccess?.();
})
.catch(err => handleError(err, [], card.setError));
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
.setProfileImage({ file })
.then(() => {
card.setIdle();
onSuccess?.();
})
.catch(err => handleError(err, [], card.setError));
};
Expand All @@ -83,6 +84,7 @@ export const ProfileForm = withCardStateProvider((props: ProfileFormProps) => {
.setProfileImage({ file: null })
.then(() => {
card.setIdle();
onSuccess?.();
})
.catch(err => handleError(err, [], card.setError));
};
Expand Down
Loading