This commit is contained in:
ajaythapliyal
2023-02-17 01:17:43 +05:30
parent 85b2f54829
commit 1b6a58520c
9 changed files with 301 additions and 6267 deletions

View File

@@ -3,16 +3,29 @@ import Navigation from './components/Navigation';
import Conversation from './components/Conversation/Conversation';
import APIKeyModal from './components/APIKeyModal';
import About from './components/About';
import { useState } from 'react';
import { NavState } from './models/misc';
export default function App() {
const [navState, setNavState] = useState<NavState>('OPEN');
return (
<div className="relative flex flex-col transition-all md:flex-row">
<div className="min-h-full min-w-full transition-all">
<APIKeyModal />
<Navigation />
<Routes>
<Route path="/" element={<Conversation />} />
<Route path="/about" element={<About />} />
</Routes>
<Navigation
navState={navState}
setNavState={(val: NavState) => setNavState(val)}
/>
<div
className={`${
navState === 'OPEN' ? 'ml-0 md:ml-72 lg:ml-96' : ' ml-0 md:ml-16'
}`}
>
<Routes>
<Route path="/" element={<Conversation />} />
<Route path="/about" element={<About />} />
</Routes>
</div>
</div>
);
}