feat: update DeleteSegmentDialog to use ConfirmationDialogContent CAL-5399 (#20820)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: eunjae@cal.com <eunjae@cal.com>
This commit is contained in:
1 parent
7f02464fed
commit
cf83b0a236
1 file changed
+10
-14
@@ -1,7 +1,6 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc";
|
||||
import { Button } from "@calcom/ui/components/button";
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader } from "@calcom/ui/components/dialog";
|
||||
import { Dialog, ConfirmationDialogContent } from "@calcom/ui/components/dialog";
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
|
||||
import { useDataTable } from "../../hooks";
|
||||
@@ -45,18 +44,15 @@ export function DeleteSegmentDialog({
|
||||
onClose();
|
||||
}
|
||||
}}>
|
||||
<DialogContent>
|
||||
<DialogHeader title={t("delete_segment")} />
|
||||
<div className="mb-6">{t("delete_segment_confirmation")}</div>
|
||||
<DialogFooter>
|
||||
<Button color="secondary" onClick={onClose}>
|
||||
{t("cancel")}
|
||||
</Button>
|
||||
<Button color="destructive" onClick={handleDelete} loading={isPending}>
|
||||
{t("delete")}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
<ConfirmationDialogContent
|
||||
variety="danger"
|
||||
title={t("delete_segment")}
|
||||
confirmBtnText={t("delete")}
|
||||
cancelBtnText={t("cancel")}
|
||||
isPending={isPending}
|
||||
onConfirm={handleDelete}>
|
||||
<p className="mt-5">{t("delete_segment_confirmation")}</p>
|
||||
</ConfirmationDialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user