import { Button } from '@/components/ui/button'; import { ConfirmationDialog } from '@/components/ui/dialog'; import { useNotifications } from '@/components/ui/notifications'; import { useUser } from '@/lib/auth'; import { useDeleteUser } from '../api/delete-user'; type DeleteUserProps = { id: string; }; export const DeleteUser = ({ id }: DeleteUserProps) => { const user = useUser(); const { addNotification } = useNotifications(); const deleteUserMutation = useDeleteUser({ mutationConfig: { onSuccess: () => { addNotification({ type: 'success', title: 'User Deleted', }); }, }, }); if (user.data?.id === id) return null; return ( Delete} confirmButton={ } /> ); };