mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Updated edit permissions on settings components.
This commit is contained in:
parent
ffc8f6faae
commit
7effa16f00
15 changed files with 128 additions and 148 deletions
|
|
@ -6,12 +6,11 @@ import {
|
|||
Button,
|
||||
FormSubmitButton,
|
||||
} from '@umami/react-zen';
|
||||
import { useMessages, useModified, useUpdateQuery } from '@/components/hooks';
|
||||
import { useMessages, useUpdateQuery } from '@/components/hooks';
|
||||
|
||||
export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose: () => void }) {
|
||||
const { formatMessage, labels, getErrorMessage } = useMessages();
|
||||
const { mutate, error } = useUpdateQuery('/teams/join');
|
||||
const { touch } = useModified();
|
||||
const { mutate, error, isPending, touch } = useUpdateQuery('/teams/join');
|
||||
|
||||
const handleSubmit = async (data: any) => {
|
||||
mutate(data, {
|
||||
|
|
@ -34,7 +33,9 @@ export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose:
|
|||
</FormField>
|
||||
<FormButtons>
|
||||
<Button onPress={onClose}>{formatMessage(labels.cancel)}</Button>
|
||||
<FormSubmitButton variant="primary">{formatMessage(labels.join)}</FormSubmitButton>
|
||||
<FormSubmitButton variant="primary" isLoading={isPending} isDisabled={isPending}>
|
||||
{formatMessage(labels.join)}
|
||||
</FormSubmitButton>
|
||||
</FormButtons>
|
||||
</Form>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue