import { useState } from "react"; import { Card, CardContent } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { MessageCircle } from "lucide-react"; import { motion } from "framer-motion"; export default function ChatApp() { const [messages, setMessages] = useState([]); const [input, setInput] = useState(""); const sendMessage = () => { if (input.trim()) { setMessages([...messages, { text: input, sender: "You" }]); setInput(""); } }; return (

Chat App

{messages.map((msg, index) => ( {msg.sender}: {msg.text} ))}
setInput(e.target.value)} className="flex-1 bg-gray-700 text-white border-none" placeholder="Type a message..." />
); }