"use client"; import { useState } from "react"; import Image from "next/image"; import classNames from "classnames"; import { roast } from "@/app/actions/roast"; import { Form, FormProps } from "@/components/form"; import Logo from "@/assets/logo.svg"; export default function Home() { const [data, setData] = useState(""); const [error, setError] = useState(""); const [loading, setLoading] = useState(false); const handleRoast = async (form: FormProps) => { setError(""); setData(""); setLoading(true); const res: { error?: string; data?: any; } = await roast(form); if (res.error) { setError(res.error); } else { setData(res?.data); } setLoading(false); }; return (
logo hugging face

Roast your favorite Hugging Face user! 👹

{error && (

Oops!

{error}
)}
{data && (

🧨

Roasting

{data}
)}
); }