🚸 Improve UX on create user page

This commit is contained in:
Manuel
2023-07-29 20:12:49 +02:00
parent e273c830b4
commit ed23e388f9
6 changed files with 111 additions and 24 deletions

View File

@@ -48,7 +48,12 @@ const CreateNewUserPage = () => {
),
});
const { mutateAsync, isSuccess } = api.user.createUser.useMutation();
const context = api.useContext();
const { mutateAsync, isSuccess } = api.user.createUser.useMutation({
onSettled: () => {
void context.user.getAll.invalidate();
}
});
return (
<MainLayout>