test recap

This commit is contained in:
priyanshuvish
2025-07-24 19:35:45 +05:30
parent 4bd22b3742
commit a3cacf7a6a

View File

@@ -142,6 +142,7 @@ const ProjectFormSection = () => {
timeline: "",
ndaRequired: false,
agreeTerms: false,
recaptcha: "",
});
const [errors, setErrors] = useState<Record<string, string>>({});
@@ -212,6 +213,7 @@ const ProjectFormSection = () => {
const handleRecaptchaVerify = (token: string) => {
setRecaptchaToken(token);
setIsRecaptchaVerified(true);
setFormData((prev) => ({ ...prev, recaptcha: token }));
};
const handleSubmit = async (e: React.FormEvent) => {
@@ -267,6 +269,7 @@ const ProjectFormSection = () => {
timeline: "",
ndaRequired: false,
agreeTerms: false,
recaptcha: "",
});
setAttachedFiles([]);
@@ -740,6 +743,13 @@ const ProjectFormSection = () => {
<span>Verification successful</span>
</div>
)}
{errors.recaptcha && (
<p className="text-red-400 text-sm text-center mt-3">
{errors.recaptcha}
</p>
)}
</div>
</div>
@@ -763,11 +773,6 @@ const ProjectFormSection = () => {
</div>
</ShimmerButton>
{errors.recaptcha && (
<p className="text-red-400 text-sm text-center mt-3">
{errors.recaptcha}
</p>
)}
{(!formData.agreeTerms || !isRecaptchaVerified) && (
<p className="text-center text-sm text-gray-400 mt-3">