"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 { Gift, Shield } from "lucide-react" interface Props { onSubmit: (data: { donorName: string donorEmail: string donorPhone: string giftAid: boolean }) => void amount: number } export function IdentityStep({ onSubmit, amount }: Props) { const [name, setName] = useState("") const [email, setEmail] = useState("") const [phone, setPhone] = useState("") const [giftAid, setGiftAid] = useState(false) const [submitting, setSubmitting] = useState(false) const hasContact = email.includes("@") || phone.length >= 10 const isValid = hasContact const giftAidBonus = Math.round(amount * 0.25) const handleSubmit = async () => { if (!isValid) return setSubmitting(true) try { await onSubmit({ donorName: name, donorEmail: email, donorPhone: phone, giftAid }) } catch { setSubmitting(false) } } return (
We need a way to send you payment details
We'll send your payment instructions and receipt here
We can send reminders via SMS if you prefer
Boost your £{(amount / 100).toFixed(0)} pledge to{" "} £{((amount + giftAidBonus) / 100).toFixed(0)} at no extra cost. HMRC adds 25% — the charity claims it back.
{giftAid && (I confirm I am a UK taxpayer and understand that if I pay less Income Tax and/or Capital Gains Tax than the amount of Gift Aid claimed on all my donations in that tax year it is my responsibility to pay any difference.
)}