From faaeeddd33edf982849485bee4c7a8260c1bc98f Mon Sep 17 00:00:00 2001 From: Prakshitha Malla Date: Sat, 30 May 2026 00:40:44 +0530 Subject: [PATCH] fix: added confirmation guard check dialog prior to deleting dynamic env vars #42 --- app/console/env/page.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/console/env/page.tsx b/app/console/env/page.tsx index a2ad6d1..857fe5c 100644 --- a/app/console/env/page.tsx +++ b/app/console/env/page.tsx @@ -123,6 +123,12 @@ export default function Page() { const handleDelete = async (key: string) => { if (!project) return; + + // Safety check confirmation added here + if (!window.confirm(`Are you sure you want to delete the environment variable "${key}"? This action cannot be undone.`)) { + return; + } + setDeletingKey(key); try { const res = await fetch("/api/env-vars", { @@ -311,5 +317,4 @@ export default function Page() { )} ); -} - +} \ No newline at end of file