Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Login button #397

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions frontend/src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function Navbar() {
const [show, setShow] = useState(false);
const handleLogIn = async () => {
console.log("working");
setShow(true);

};
const handleLogOut = async () => {
console.log("working");
Expand Down Expand Up @@ -122,7 +124,7 @@ function Navbar() {
</NavLink>

{/* Dropdown Menus */}
{isDropdownOpen && (
{isDropdownOpen && show &&(
<div
className="absolute left-0 mt-0 w-56 bg-light_theme border border-dark_theme rounded shadow-lg z-50"
onMouseEnter={handleMouseEnter}
Expand Down Expand Up @@ -169,7 +171,7 @@ function Navbar() {
>
<IoCartOutline className="text-dark_theme size-8 hidden md:block mr-1" />
<div className="absolute bottom-4 left-4 border border-main_theme rounded-full cursor-pointer z-50 bg-main_theme/90 text-light_theme">
<span className="px-2 py-2 text-xs font-medium">7</span>
<span className="px-2 py-2 text-xs font-medium">0</span>
</div>
</div>

Expand Down Expand Up @@ -249,7 +251,7 @@ function Navbar() {
>
<IoCartOutline className="text-dark_theme size-8 mr-1" />
<div className="absolute bottom-4 left-4 border border-main_theme rounded-full cursor-pointer z-50 bg-main_theme/90 text-light_theme">
<span className="px-2 py-2 text-xs font-medium">7</span>
<span className="px-2 py-2 text-xs font-medium">0</span>
</div>
</div>
</div>
Expand Down