'use client' import React, { useState } from 'react'; import { motion } from 'framer-motion'; import { InView } from 'react-intersection-observer'; type Mode = 'light' | 'dark'; interface Props { mode: Mode; } const Waitlist: React.FC = ({ mode }) => { const [email, setEmail] = useState(''); const [submitted, setSubmitted] = useState(false); // Here you can write the Logic to send email const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); if (email.trim() === '' || !email.includes('@')) { return; } setSubmitted(true); setEmail(''); }; const isEmailValid = email.trim() !== '' && email.includes('@'); return (
{({ inView, ref }) => (
{!submitted ? (
Join our waitlist Be the first to access new features. Enter your email below to join the waitlist.
setEmail(e.target.value)} /> Join
) : ( You are on the waitlist Thank you for using Serenity UI.
We'll keep you updated.
)}
)}
); } export default Waitlist;