mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Fixed mutate queries.
This commit is contained in:
parent
e462a55ab9
commit
a4f8ab6ad9
4 changed files with 20 additions and 14 deletions
|
|
@ -6,7 +6,9 @@ import useMessages from 'components/hooks/useMessages';
|
|||
export function PasswordEditForm({ onSave, onClose }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { post, useMutation } = useApi();
|
||||
const { mutate, error, isLoading } = useMutation((data: any) => post('/me/password', data));
|
||||
const { mutate, error, isPending } = useMutation({
|
||||
mutationFn: (data: any) => post('/me/password', data),
|
||||
});
|
||||
const ref = useRef(null);
|
||||
|
||||
const handleSubmit = async (data: any) => {
|
||||
|
|
@ -56,7 +58,7 @@ export function PasswordEditForm({ onSave, onClose }) {
|
|||
</FormInput>
|
||||
</FormRow>
|
||||
<FormButtons flex>
|
||||
<Button type="submit" variant="primary" disabled={isLoading}>
|
||||
<Button type="submit" variant="primary" disabled={isPending}>
|
||||
{formatMessage(labels.save)}
|
||||
</Button>
|
||||
<Button onClick={onClose}>{formatMessage(labels.cancel)}</Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue