Updated query hooks for teams and websites.

This commit is contained in:
Mike Cao 2024-01-29 01:32:05 -08:00
parent 9448aa3ab5
commit 2fa50892d8
61 changed files with 508 additions and 539 deletions

View file

@ -9,9 +9,8 @@ import {
SubmitButton,
PasswordField,
} from 'react-basics';
import { useApi } from 'components/hooks';
import { useApi, useMessages } from 'components/hooks';
import { ROLES } from 'lib/constants';
import { useMessages } from 'components/hooks';
export function UserEditForm({
userId,
@ -19,8 +18,8 @@ export function UserEditForm({
onSave,
}: {
userId: string;
data: any[];
onSave: (data: any) => void;
data: object;
onSave?: (data: any) => void;
}) {
const { formatMessage, labels, messages } = useMessages();
const { post, useMutation } = useApi();
@ -44,7 +43,7 @@ export function UserEditForm({
});
};
const renderValue = value => {
const renderValue = (value: string) => {
if (value === ROLES.user) {
return formatMessage(labels.user);
}