import { Button, Stack, Modal } from '@mantine/core'; import useRemoveCardFromLibrary from '../../lib/mutations/useRemoveCardFromLibrary'; import { notifications } from '@mantine/notifications'; import { DANGER_OVERLAY_PROPS } from '@/styles/overlays'; interface Props { isOpen: boolean; onClose: () => void; cardId: string; } export default function RemoveCardFromLibraryModal(props: Props) { const removeCardFromLibrary = useRemoveCardFromLibrary(); const handleRemoveCardFromLibrary = () => { removeCardFromLibrary.mutate(props.cardId, { onError: () => { notifications.show({ message: 'Could not remove card from library.', position: 'top-center', }); }, onSettled: () => { props.onClose(); }, }); }; return ( ); }