Skip to content

Commit 4258a98

Browse files
committed
added subscribe functionality
1 parent 1053b4b commit 4258a98

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

src/components/Donation.tsx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,27 @@ const Donation: React.FC = () => {
139139
className="mt-4 flex justify-center items-center"
140140
variants={slideInRight}
141141
>
142-
<input
143-
className="px-4 py-2 border border-gray-300 rounded-l-full focus:outline-none"
144-
placeholder="Enter your email"
145-
type="email"
146-
/>
147-
<motion.button
148-
className="px-6 py-2 bg-red-500 text-white font-bold rounded-r-full shadow-lg hover:bg-red-600 transition duration-300"
149-
whileHover={{ scale: 1.05 }}
150-
whileTap={{ scale: 0.95 }}
151-
transition={{ type: 'spring', stiffness: 400, damping: 10 }}
142+
<motion.form
143+
action="https://buttondown.com/api/emails/embed-subscribe/sugarlabs"
144+
method="post"
152145
>
153-
SUBSCRIBE
154-
</motion.button>
146+
<input
147+
className="px-4 py-2 border border-gray-300 rounded-l-full focus:outline-none"
148+
placeholder="Enter your email"
149+
type="email"
150+
name="email"
151+
required
152+
/>
153+
<motion.button
154+
className="px-6 py-2 bg-red-500 text-white font-bold rounded-r-full shadow-lg hover:bg-red-600 transition duration-300"
155+
whileHover={{ scale: 1.05 }}
156+
whileTap={{ scale: 0.95 }}
157+
transition={{ type: 'spring', stiffness: 400, damping: 10 }}
158+
type="submit"
159+
>
160+
SUBSCRIBE
161+
</motion.button>
162+
</motion.form>
155163
</motion.div>
156164
</motion.div>
157165
</div>

0 commit comments

Comments
 (0)