Skip to content

Commit

Permalink
navbar: added navbar to AppLayout to make it available app-wide
Browse files Browse the repository at this point in the history
fixes: #121
  • Loading branch information
sethdivyansh committed Jun 18, 2024
1 parent 1717c35 commit 906cc93
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Navbar: React.FC = () => {

return (
<div>
<div className="flex justify-between items-center p-4 ml-4 mt-4 mr-2 relative z-10">
<div className="flex justify-between items-center p-4 ml-4 mt-4 mr-2 fixed z-10 w-full">
<div className="space-x-4">
<button onClick={toggleMenu}>
<img
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
@tailwind components;
@tailwind utilities;

body {
overflow: hidden;
}

::-webkit-scrollbar {
width: 16px;
}
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/AppLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Outlet } from 'react-router-dom';
import Navbar from '../Navbar';

function AppLayout() {
return (
<div>
<Navbar />
<Outlet />
{/* todo: Add a footer component */}
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useNavigate } from 'react-router-dom';
import { useState } from 'react';
import Button from '../library/button';
import Navbar from '../Navbar';
// import Navbar from '../Navbar';
import Modal from '../library/modal';
import '../index.css';

Expand All @@ -22,7 +22,7 @@ const Home: React.FC = () => {

return (
<div className="min-h-screen bg-uno-bg bg-cover bg-center flex flex-col relative">
<Navbar />
{/* <Navbar /> */}
<div className="flex flex-col items-center justify-center flex-grow">
<div className="w-[520px] h-[180px] sm:w-[600px] sm:h-[200px] md:w-[720px] md:h-[235px] lg:w-[900px] lg:h-[300px] overflow-hidden mt-4 mb-5">
<img
Expand Down

0 comments on commit 906cc93

Please sign in to comment.