diff --git a/app/(main)/projects/[id]/settings/danger-zone/page.tsx b/app/(main)/projects/[id]/settings/danger-zone/page.tsx index f79fa9a..1579ad2 100644 --- a/app/(main)/projects/[id]/settings/danger-zone/page.tsx +++ b/app/(main)/projects/[id]/settings/danger-zone/page.tsx @@ -25,16 +25,10 @@ const ProjectSettingsDangerZonePage = ({ ); const router = useRouter(); - const handleDeleteProject = () => { - deleteProject({ id }) - .then(() => { - toast.success("Project deleted successfully"); - router.push(DASHBOARD_ROUTE); - }) - .catch(() => { - toast.error("Failed to delete project"); - }); - }; + const handleDeleteProject = () => + deleteProject({ id }).then(() => { + router.push(DASHBOARD_ROUTE); + }); return (
@@ -44,6 +38,7 @@ const ProjectSettingsDangerZonePage = ({ onConfirm={handleDeleteProject} header="Delete project" disabled={isPending} + toastMessage="Project deleted successfully" >
@@ -60,6 +60,8 @@ const LinkCard = ({ deleteLink({ _id })} header={`Delete link:${title}`} + disabled={isPending} + toastMessage="Link deleted successfully" >