"use client"; import { useState } from "react"; import { Button } from "../ui/button"; import { Input } from "../ui/input"; import Image from "next/image"; import { Happy_Monkey } from "next/font/google"; const happyMonkey = Happy_Monkey({ preload: true, weight: "400", subsets: ["latin"], }); const Newsletter = () => { const [submission, setSubmission] = useState< "idle" | "loading" | "success" | "error" >("idle"); const handleSubmit = async () => { console.log("Done"); }; return (

Join The Newsletter!

Choosing the right website deployment option is important when creating a website, because it directly impacts the user experience and the resources required to run your website.

see here {submission === "idle" && "Subscribe Now"} {submission === "loading" && (

Subscribing...

)} {submission === "success" && (

🎉 Subscribed successfully...

)} {submission === "error" && (

😥 Something went wrong...

)}

); }; export default Newsletter;