Deploy
This commit is contained in:
@@ -0,0 +1,63 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useState } from 'react'
|
||||||
|
import Input from '@/components/ui/Input'
|
||||||
|
import Button from '@/components/ui/Button'
|
||||||
|
import { Leaf, Send } from 'lucide-react'
|
||||||
|
|
||||||
|
export default function NewsletterSection() {
|
||||||
|
const [email, setEmail] = useState('')
|
||||||
|
const [status, setStatus] = useState<"idle" | "subscribed">('idle')
|
||||||
|
|
||||||
|
const handleSubmit = (e: React.FormEvent) => {
|
||||||
|
e.preventDefault()
|
||||||
|
if (!email) return
|
||||||
|
// Simulate subscription — in production send to API
|
||||||
|
setStatus('subscribed')
|
||||||
|
setEmail('')
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section data-vula-section="newsletter" id="newsletter" className="py-20 bg-[#f4f5f2]">
|
||||||
|
<div className="max-w-xl mx-auto px-4">
|
||||||
|
<div className="border-2 border-[#8b5a3c]/30 rounded-3xl p-10 bg-white shadow-xl shadow-[#6b8e23]/5">
|
||||||
|
<div className="text-center mb-8">
|
||||||
|
<Leaf className="w-8 h-8 mx-auto mb-3 text-[#6b8e23]" />
|
||||||
|
<h2 className="text-3xl font-bold text-[#2c331f]">Join the Ngcobo Naturals Circle</h2>
|
||||||
|
<p className="text-[#8b5a3c] mt-3 max-w-sm mx-auto">
|
||||||
|
Receive exclusive herbal recipes, seasonal skincare rituals, and early access to limited small-batch releases.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{status === 'subscribed' ? (
|
||||||
|
<div className="text-center text-[#6b8e23] font-medium py-4">
|
||||||
|
✓ You're on the list! Welcome to the community.
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<form onSubmit={handleSubmit} className="flex gap-3 items-start">
|
||||||
|
<div className="flex-1">
|
||||||
|
<Input
|
||||||
|
type="email"
|
||||||
|
placeholder="your@email.com"
|
||||||
|
value={email}
|
||||||
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
|
required
|
||||||
|
className="rounded-xl border-[#daddd4] bg-[#f4f5f2]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
variant="default"
|
||||||
|
size="md"
|
||||||
|
className="bg-[#6b8e23] hover:bg-[#5a7a1d] text-white border-none rounded-xl px-6"
|
||||||
|
>
|
||||||
|
<Send className="w-4 h-4 mr-2" />
|
||||||
|
Subscribe
|
||||||
|
</Button>
|
||||||
|
</form>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user