forked from open-webui/open-webui
		
	update initals avatar if user changes name
This commit is contained in:
		
							parent
							
								
									40e1e212d4
								
							
						
					
					
						commit
						a0a064f4c8
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -39,6 +39,11 @@ | |||
|     }; | ||||
| 
 | ||||
| 	const submitHandler = async () => { | ||||
| 		const isInitialsImage: boolean = profileImageUrl === generateInitialsImage($user.name) || profileImageUrl === ''; | ||||
|         if (isInitialsImage && name !== $user.name) { | ||||
|             profileImageUrl = generateInitialsImage(name); | ||||
|         } | ||||
| 
 | ||||
| 		const updatedUser = await updateUserProfile(localStorage.token, name, profileImageUrl).catch( | ||||
| 			(error) => { | ||||
| 				toast.error(error); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Danny Liu
						Danny Liu