mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 11:05:36 +01:00
Converted mutation queries.
This commit is contained in:
parent
3f167e05ba
commit
0f9669f886
34 changed files with 259 additions and 350 deletions
|
|
@ -1,13 +1,10 @@
|
|||
import { useApi, useMessages } from '@/components/hooks';
|
||||
import { useDeleteQuery, useMessages } from '@/components/hooks';
|
||||
import { Icon, LoadingButton, Text } from '@umami/react-zen';
|
||||
import { Close } from '@/components/icons';
|
||||
|
||||
export function TeamWebsiteRemoveButton({ teamId, websiteId, onSave }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { del, useMutation } = useApi();
|
||||
const { mutate, isPending } = useMutation({
|
||||
mutationFn: () => del(`/teams/${teamId}/websites/${websiteId}`),
|
||||
});
|
||||
const { mutate, isPending } = useDeleteQuery(`/teams/${teamId}/websites/${websiteId}`);
|
||||
|
||||
const handleRemoveTeamMember = async () => {
|
||||
mutate(null, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue