import React, { useState } from 'react'; import ChatMessage from '../components/ChatMessage'; import Sidebar from '../components/SideBarGPT'; const Chat = () => { const [messages, setMessages] = useState([]); const [input, setInput] = useState(''); const handleSend = () => { if (input.trim()) { const newMessage = { text: input, timestamp: new Date().toLocaleTimeString(), isUser: true, }; setMessages([...messages, newMessage]); // Simulate bot response setTimeout(() => { const botMessage = { text: 'Onboarding clients is a critical process that sets the tone for your relationship and ensures that the client understands and is comfortable with your services. Here\'s a detailed procedure for onboarding clients, tailored to a technology or software development company:', timestamp: new Date().toLocaleTimeString(), isUser: false, }; setMessages((prevMessages) => [...prevMessages, botMessage]); }, 1000); setInput(''); } }; return (

Chat

{messages.map((message, index) => ( ))}
setInput(e.target.value)} placeholder="Type a message..." />
); }; export default Chat;