diff --git a/app/admin/broadcast/BroadcastForm.tsx b/app/admin/broadcast/BroadcastForm.tsx new file mode 100644 index 0000000..6953502 --- /dev/null +++ b/app/admin/broadcast/BroadcastForm.tsx @@ -0,0 +1,56 @@ +"use client"; + +import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Textarea } from "@/components/ui/textarea"; +import { broadcastAll } from "./actions"; + +const BODY_LIMIT = 160; + +export default function BroadcastForm({ + hackerCount, +}: { + hackerCount: number; +}) { + const [bodyLength, setBodyLength] = useState(0); + + return ( +
{ + if ( + !confirm(`This will email all ${hackerCount} hackers. Are you sure?`) + ) { + e.preventDefault(); + } + }} + className="flex flex-col gap-4" + > +
+ + +
+ +
+ +