Skip to content

Commit 2188464

Browse files
committed
Reinforce security when deleting a form
1 parent 6d6f573 commit 2188464

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

components/form/settings.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,20 @@ export default function SettingsForms({ dataForm }: { dataForm: any }) {
466466
onChange={(e) => {
467467
setConfirmFormName(e.target.value)
468468
}}
469+
value={confirmFormName}
469470
className=""
470471
/>
471472
</div>
472473
</AlertDialogDescription>
473474
</AlertDialogHeader>
474475
<AlertDialogFooter>
475-
<AlertDialogCancel>Cancel</AlertDialogCancel>
476+
<AlertDialogCancel
477+
onClick={() => {
478+
setConfirmFormName("")
479+
}}
480+
>
481+
Cancel
482+
</AlertDialogCancel>
476483
<button
477484
className={cn(
478485
"inline-flex h-10 items-center justify-center rounded-md bg-red-500 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-slate-900 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-red-600 dark:hover:bg-slate-200 dark:hover:text-slate-900 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900"

0 commit comments

Comments
 (0)