Convert all mutate to mutateAsync.

This commit is contained in:
Mike Cao 2025-09-22 22:39:25 -07:00
parent 980e4e6b41
commit 6faf16e9aa
32 changed files with 78 additions and 97 deletions

View file

@ -13,11 +13,11 @@ import { useMessages, useUpdateQuery } from '@/components/hooks';
import { ROLES } from '@/lib/constants';
export function UserAddForm({ onSave, onClose }) {
const { mutate, error, isPending } = useUpdateQuery(`/users`);
const { mutateAsync, error, isPending } = useUpdateQuery(`/users`);
const { formatMessage, labels, getErrorMessage } = useMessages();
const handleSubmit = async (data: any) => {
mutate(data, {
await mutateAsync(data, {
onSuccess: async () => {
onSave(data);
onClose();