App.jsx
1 import { useState } from 'react'; 2 import Terminal from './terminal/Terminal'; 3 import NewChatInterface from './newChatInterface/NewChatInterface'; 4 import './App.css'; 5 6 function App() { 7 const [showNewChatInterface, setShowNewChatInterface] = useState(false); 8 9 const handleOpenNewChat = () => { 10 setShowNewChatInterface(true); 11 }; 12 13 const handleCloseNewChat = () => { 14 setShowNewChatInterface(false); 15 }; 16 17 return ( 18 <div className="container"> 19 {showNewChatInterface ? ( 20 <NewChatInterface onClose={handleCloseNewChat} /> 21 ) : ( 22 <Terminal onOpenNewChat={handleOpenNewChat} /> 23 )} 24 </div> 25 ); 26 } 27 28 export default App;