File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React , { useState } from 'react' ;
22import { donationData } from '@/constants/Donation' ;
33import { Link } from 'react-router-dom' ;
44import { volunteerImages } from '@/constants/Volunteer' ;
@@ -18,6 +18,8 @@ const Donation: React.FC = () => {
1818 window . location . href = donationData . url ;
1919 } ;
2020
21+ const [ Email , setEmail ] = useState ( '' ) ;
22+
2123 return (
2224 < section className = "relative overflow-hidden bg-white text-black py-16 px-4" >
2325 { /* Animated background circles */ }
@@ -142,14 +144,18 @@ const Donation: React.FC = () => {
142144 < motion . form
143145 action = "https://buttondown.com/api/emails/embed-subscribe/sugarlabs"
144146 method = "post"
147+ onSubmit = { ( ) => setTimeout ( ( ) => setEmail ( '' ) , 500 ) }
145148 >
146149 < input
147150 className = "px-4 py-2 border border-gray-300 rounded-l-full focus:outline-none"
148151 placeholder = "Enter your email"
149152 type = "email"
150153 name = "email"
154+ value = { Email }
155+ onChange = { ( e ) => setEmail ( e . target . value ) }
151156 required
152157 />
158+ < input value = "1" type = "hidden" name = "embed" />
153159 < motion . button
154160 className = "px-6 py-2 bg-red-500 text-white font-bold rounded-r-full shadow-lg hover:bg-red-600 transition duration-300"
155161 whileHover = { { scale : 1.05 } }
You can’t perform that action at this time.
0 commit comments