From c9adf80d88d7d408ce0597c89df3394e12098fa3 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Sun, 10 May 2026 01:55:37 +0800 Subject: [PATCH] refactor(manage): use shared ConfirmDialog in benchmarks page --- .../manage/benchmarks/benchmarks-client.tsx | 192 +++++------------- 1 file changed, 56 insertions(+), 136 deletions(-) diff --git a/app/(manage)/manage/benchmarks/benchmarks-client.tsx b/app/(manage)/manage/benchmarks/benchmarks-client.tsx index 956be3b..3b0be44 100644 --- a/app/(manage)/manage/benchmarks/benchmarks-client.tsx +++ b/app/(manage)/manage/benchmarks/benchmarks-client.tsx @@ -13,6 +13,7 @@ import { ChevronLeftIcon, ChevronRightIcon, } from "lucide-react" +import { ConfirmDialog } from "@/components/ui/modal" interface PerformanceEntry { id: string @@ -517,145 +518,64 @@ export function BenchmarksClient() { )} {/* Confirmation Dialogs */} - {confirmAction && ( -
-
- {confirmAction.type === "verify" && ( - <> -

- Confirm Verify -

-

- Are you sure you want to verify this benchmark? It will be - marked as verified. -

-
- - -
- - )} + {confirmAction?.type === "verify" && ( + setConfirmAction(null)} + onConfirm={() => handleVerify(confirmAction.entry)} + title="Confirm Verify" + message="Are you sure you want to verify this benchmark? It will be marked as verified." + confirmLabel="Verify" + variant="default" + loading={actionLoading[confirmAction.entry.id]} + /> + )} - {confirmAction.type === "remove" && ( - <> -

- Confirm Remove -

-

- Are you sure you want to remove this benchmark? -

-