File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
packages/clerk-js/src/ui/components Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/clerk-js ' : patch
3+ ---
4+
5+ 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 @@ -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 } ;
Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments