import { Button, Group, Stack, Text } from '@mantine/core'; import { ContextModalProps, modals } from '@mantine/modals'; import { api } from '~/utils/api'; export const DeleteInviteModal = ({ context, id, innerProps, }: ContextModalProps<{ tokenId: string }>) => { const apiContext = api.useContext(); const { isLoading, mutateAsync } = api.invites.delete.useMutation({ onSuccess: async () => { await apiContext.invites.all.invalidate(); modals.close(id); }, }); return ( Are you sure, that you want to delete this invitation? Users with this link will no longer be able to create an account using that link. ); };