import toast from "react-hot-toast"; import Modal from "../Modal"; import useUserStore from "@/store/admin/users"; import Button from "../ui/Button"; type Props = { onClose: Function; userId: number; }; export default function DeleteUserModal({ onClose, userId }: Props) { const { removeUser } = useUserStore(); const deleteUser = async () => { const load = toast.loading("Deleting..."); const response = await removeUser(userId); toast.dismiss(load); response.ok && toast.success(`User Deleted.`); onClose(); }; return (

Delete User

Are you sure you want to remove this user?

Warning: This action is irreversible!
); }