mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
Fixed teams settings.
This commit is contained in:
parent
9104332623
commit
b0c9197f2d
21 changed files with 40 additions and 2 deletions
|
|
@ -1,29 +0,0 @@
|
|||
import { useApi, useMessages } from 'components/hooks';
|
||||
import { Icon, Icons, LoadingButton, Text } from 'react-basics';
|
||||
|
||||
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 handleRemoveTeamMember = async () => {
|
||||
mutate(null, {
|
||||
onSuccess: () => {
|
||||
onSave();
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<LoadingButton variant="quiet" onClick={() => handleRemoveTeamMember()} isLoading={isPending}>
|
||||
<Icon>
|
||||
<Icons.Close />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.remove)}</Text>
|
||||
</LoadingButton>
|
||||
);
|
||||
}
|
||||
|
||||
export default TeamWebsiteRemoveButton;
|
||||
Loading…
Add table
Add a link
Reference in a new issue