mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Use useMessages hook everywhere.
This commit is contained in:
parent
f3e1f18e1b
commit
9ddb8b5d25
73 changed files with 180 additions and 275 deletions
|
|
@ -9,13 +9,12 @@ import {
|
|||
SubmitButton,
|
||||
PasswordField,
|
||||
} from 'react-basics';
|
||||
import { useIntl } from 'react-intl';
|
||||
import useApi from 'hooks/useApi';
|
||||
import { ROLES } from 'lib/constants';
|
||||
import { labels, messages } from 'components/messages';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
export default function UserEditForm({ userId, data, onSave }) {
|
||||
const { formatMessage } = useIntl();
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { post, useMutation } = useApi();
|
||||
const { mutate, error } = useMutation(({ username }) => post(`/users/${userId}`, { username }));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue