Skip to content

Commit

Permalink
redirect title to home
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishant Pai authored and Nishant Pai committed May 3, 2023
1 parent 7b6ad18 commit 7a1cf1e
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions components/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import React from 'react';
import { GiHamburgerMenu } from 'react-icons/gi';
import { IoMdClose } from 'react-icons/io';
import React from "react";
import { GiHamburgerMenu } from "react-icons/gi";
import { IoMdClose } from "react-icons/io";

function Navbar({ title, menu, showMenu, setShowMenu }) {
return (
<div className="bg-black w-full flex justify-between items-center p-4">
<h1 className="text-lg text-white font-medium">{title}</h1>
{menu &&
<div className="md:hidden text-md text-white" onClick={() => setShowMenu(!showMenu)}>
<a className="text-lg text-white font-medium" href="/">
{title}
</a>
{menu && (
<div
className="md:hidden text-md text-white"
onClick={() => setShowMenu(!showMenu)}
>
{showMenu ? <IoMdClose /> : <GiHamburgerMenu />}
</div>
}
)}
</div>
)
);
}

export default Navbar;
export default Navbar;

0 comments on commit 7a1cf1e

Please sign in to comment.