Fix layout - Sidebar and Nav placement

This commit is contained in:
sosokker 2023-11-10 19:45:01 +07:00
parent de3abcee06
commit 79186766dc
3 changed files with 16 additions and 17 deletions

View File

@ -14,10 +14,14 @@ import IconSideNav from './components/IconSideNav'; // Import IconSideNav
const App = () => {
return (
<BrowserRouter>
<div className="App">
<div className='display: flex'>
<IconSideNav />
<div className='flex-1'>
<NavBar />
<div className='flex items-center justify-center'>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/tasks" element={<KanbanBoard />} />
<Route path="/login" element={<LoginPage />} />
<Route path="/signup" element={<SignUpPage />} />
<Route path="/testAuth" element={<TestAuth />} />
@ -25,10 +29,8 @@ const App = () => {
<Route path="/calendar" element={<Calendar />} />
</Routes>
</div>
<div>
<IconSideNav /> {<KanbanBoard />}
</div>
</div>
</BrowserRouter>
);
}

View File

@ -18,7 +18,6 @@ const IconSideNav = () => {
return (
<div className="bg-slate-900 text-slate-100 flex">
<SideNav />
<div className="w-full"></div>
</div>
);
};
@ -27,7 +26,7 @@ const SideNav = () => {
const [selected, setSelected] = useState(0);
return (
<nav className="h-[500px] w-fit bg-slate-950 p-4 flex flex-col items-center gap-2">
<nav className="bg-slate-950 p-4 flex flex-col items-center gap-2 h-screen">
{menuItems.map((item) => (
<NavItem
key={item.id}

View File

@ -119,12 +119,10 @@ function KanbanBoard() {
className="
m-auto
flex
min-h-screen
w-full
items-center
overflow-x-auto
overflow-y-hidden
px-[40px]
"
>
<DndContext