import React, { useState } from "react"; import { askGroq } from "./groqClient"; import "./index.css"; // Add Tailwind directives here const products = [ { id: 1, name: "Wireless Headphones", price: "$99" }, { id: 2, name: "Smart Watch", price: "$199" }, { id: 3, name: "AI Laptop", price: "$1299" }, ]; function App() { const [msg, setMsg] = useState(""); const [reply, setReply] = useState(""); const handleAsk = async (e) => { e.preventDefault(); const res = await askGroq(msg); setReply(res); setMsg(""); }; return (
{/* Navbar */} {/* Products */}

Top Products

{products.map((p) => (

{p.name}

{p.price}

))}
{/* AI Chat */}

Ask AI Assistant

setMsg(e.target.value)} required />
{reply && (
AI: {reply}
)}
); } export default App;