Skip to content

Commit

Permalink
Update NavbarLeft.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sailaja-adapa authored Jul 21, 2024
1 parent a4bcd52 commit 3142afe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/Component/Navbar/NavbarLeft.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect } from "react";
import "../../style/Navbar.css";
import "../../style/Navbar.css"
import logo from "../../image/logo1.png";
function NavbarLeft(props, showSideNav) {
useEffect(() => {
Expand All @@ -12,6 +12,7 @@ function NavbarLeft(props, showSideNav) {
document.body.addEventListener('click', handleDocumentClick);

return () => {
// Removed event listener on component unmount
document.body.removeEventListener('click', handleDocumentClick);
};
}, [props]);
Expand Down Expand Up @@ -39,7 +40,7 @@ function NavbarLeft(props, showSideNav) {
<span></span>
</div>
</a>
<a href="/" onClick={handleItemClick}>
<a href="/" onClick={handleItemClick}> {/* Added onClick handler */}
<img className="navbar-brand logo-img" src={logo} alt="this" />
</a>
</span>
Expand Down

0 comments on commit 3142afe

Please sign in to comment.