Skip to content

Commit

Permalink
Frontend: Improved Navbar by dynamic links
Browse files Browse the repository at this point in the history
>>
>>     now the navbar uses a list of links to render different buttons as required by the links
>>
>>     Fixes: #122
  • Loading branch information
PrathamX595 committed Jun 30, 2024
1 parent 50ddab2 commit 5c420a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const rules = (
</div>
</>
);

const Navbar: React.FC = () => {
const [sidebarOpen, setSidebarOpen] = useState(false);
const auth = useAuth();
Expand All @@ -135,7 +136,6 @@ const Navbar: React.FC = () => {
const location = useLocation();
const showLoginBtn =
location.pathname !== '/login' && location.pathname !== '/signup';

const toggleMenu = () => {
setSidebarOpen(!sidebarOpen);
};
Expand Down

0 comments on commit 5c420a6

Please sign in to comment.