feat: fetching signatures from backend endpoint

This commit is contained in:
2025-11-10 22:36:54 +00:00
parent 4371b26423
commit f8712015c0
9 changed files with 91 additions and 33 deletions

View File

@@ -34,12 +34,22 @@ export const PetitionForm = ({ compact = false }: PetitionFormProps) => {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (isSubmitting) {
return;
}
setIsSubmitting(true);
await onSignPetition({
email,
comment,
name,
});
setName(undefined);
setEmail(undefined);
setComment(undefined);
setIsSubmitting(false);
};