Updated settings components.
This commit is contained in:
1 parent
1d9c3133f0
commit
91af593ff5
31 files changed
+805
-494
No files matched your search
@@ -9,7 +9,6 @@ import {
|
||||
SubmitButton,
|
||||
} from 'react-basics';
|
||||
import { useRef } from 'react';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import useApi from 'hooks/useApi';
|
||||
import { ROLES } from 'lib/constants';
|
||||
|
||||
@@ -26,7 +25,7 @@ const items = [
|
||||
|
||||
export default function UserEditForm({ data, onSave }) {
|
||||
const { id } = data;
|
||||
const { post } = useApi();
|
||||
const { post, useMutation } = useApi();
|
||||
const { mutate, error } = useMutation(({ username }) => post(`/user/${id}`, { username }));
|
||||
const ref = useRef(null);
|
||||
|
||||
|
||||
Reference in new issue
Block a user