diff --git a/apps/web/src/project/components/delete-project-dialog.tsx b/apps/web/src/project/components/delete-project-dialog.tsx index 0086384e..6059be8b 100644 --- a/apps/web/src/project/components/delete-project-dialog.tsx +++ b/apps/web/src/project/components/delete-project-dialog.tsx @@ -10,6 +10,9 @@ import { import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; +import { useState } from "react"; + +const REQUIRED_CONFIRMATION_TEXT = "DELETE"; export function DeleteProjectDialog({ isOpen, @@ -25,6 +28,8 @@ export function DeleteProjectDialog({ const count = projectNames.length; const isSingle = count === 1; const singleName = isSingle ? projectNames[0] : null; + + const [confirmationInput, setConfirmationInput] = useState(""); return ( @@ -60,11 +65,13 @@ export function DeleteProjectDialog({
{setConfirmationInput(e.target.value)}} + value={confirmationInput} type="text" - placeholder="DELETE" + placeholder={REQUIRED_CONFIRMATION_TEXT} size="lg" variant="destructive" /> @@ -74,7 +81,7 @@ export function DeleteProjectDialog({ -