mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 11:05:36 +01:00
Converted mutation queries.
This commit is contained in:
parent
3f167e05ba
commit
0f9669f886
34 changed files with 259 additions and 350 deletions
|
|
@ -9,14 +9,11 @@ import {
|
|||
PasswordField,
|
||||
Button,
|
||||
} from '@umami/react-zen';
|
||||
import { useApi, useMessages } from '@/components/hooks';
|
||||
import { useMessages, useUpdateQuery } from '@/components/hooks';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
|
||||
export function UserAddForm({ onSave, onClose }) {
|
||||
const { post, useMutation } = useApi();
|
||||
const { mutate, error, isPending } = useMutation({
|
||||
mutationFn: (data: any) => post(`/users`, data),
|
||||
});
|
||||
const { mutate, error, isPending } = useUpdateQuery(`/users`);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
const handleSubmit = async (data: any) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue