Fix the query invalidation
This commit is contained in:
		
							parent
							
								
									fbc1df9a30
								
							
						
					
					
						commit
						861cfdfed0
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -360,7 +360,11 @@ function UserDropdown({ small }: { small?: boolean }) { | |||
|   const { t } = useLocale(); | ||||
|   const query = useMeQuery(); | ||||
|   const user = query.data; | ||||
|   const mutation = trpc.useMutation("viewer.away"); | ||||
|   const mutation = trpc.useMutation("viewer.away", { | ||||
|     onSettled() { | ||||
|       utils.invalidateQueries("viewer.me"); | ||||
|     }, | ||||
|   }); | ||||
|   const utils = trpc.useContext(); | ||||
| 
 | ||||
|   return ( | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Bailey Pumfleet
						Bailey Pumfleet