mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 03:55:37 +01:00
Updated website, team and user save.
This commit is contained in:
parent
2fa50892d8
commit
fec81695e8
15 changed files with 128 additions and 117 deletions
|
|
@ -1,6 +1,4 @@
|
|||
import { useApi, useMessages } from 'components/hooks';
|
||||
import { useContext } from 'react';
|
||||
import SettingsContext from '../../SettingsContext';
|
||||
import TypeConfirmationForm from 'components/common/TypeConfirmationForm';
|
||||
|
||||
const CONFIRM_VALUE = 'DELETE';
|
||||
|
|
@ -15,10 +13,9 @@ export function WebsiteDeleteForm({
|
|||
onClose?: () => void;
|
||||
}) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { websitesUrl } = useContext(SettingsContext);
|
||||
const { del, useMutation } = useApi();
|
||||
const { mutate, isPending, error } = useMutation({
|
||||
mutationFn: (data: any) => del(`${websitesUrl}/${websiteId}`, data),
|
||||
mutationFn: (data: any) => del(`/websites/${websiteId}`, data),
|
||||
});
|
||||
|
||||
const handleConfirm = async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue