Fix the query invalidation

pull/1487/head
Bailey Pumfleet 2022-01-12 13:46:24 +00:00
parent fbc1df9a30
commit 861cfdfed0
1 changed files with 5 additions and 1 deletions

View File

@ -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 (