frontend: fix mouse event listener
This commit is contained in:
@ -64,4 +64,6 @@ jobs:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_REGISTRY }}/taqi/portfolio/my-portfolio-app:latest
|
||||
tags:
|
||||
- ${{ secrets.DOCKER_REGISTRY }}/taqi/portfolio/my-portfolio-app:latest
|
||||
- ${{ secrets.DOCKER_REGISTRY }}/taqi/portfolio/my-portfolio-app:1.0.0-${{ gitea.run_number }}
|
||||
|
||||
@ -35,11 +35,13 @@ const Navbar: React.FC<NavProps> = ({ toggleDarkMode, darkMode }) => {
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('mousedown', handleClickoutside)
|
||||
if (isMenuOpen) {
|
||||
document.addEventListener('mousedown', handleClickoutside)
|
||||
}
|
||||
return () => {
|
||||
document.removeEventListener('mousedown', handleClickoutside)
|
||||
}
|
||||
})
|
||||
}, [isMenuOpen])
|
||||
|
||||
const menuItem = [
|
||||
{ title: 'Home', href: '/' },
|
||||
|
||||
@ -1 +1 @@
|
||||
{"root":["./src/App.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/Introduction.tsx","./src/components/Navbar.tsx","./src/components/Photo.tsx","./src/components/Skills.tsx"],"version":"5.6.2"}
|
||||
{"root":["./src/App.tsx","./src/constants.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/Footer.tsx","./src/components/Introduction.tsx","./src/components/Navbar.tsx","./src/components/Photo.tsx","./src/components/Sidebar.tsx","./src/components/Skills.tsx","./src/components/Tooltip.tsx","./src/pages/Experience.tsx","./src/pages/Home.tsx","./src/pages/Interests.tsx","./src/pages/Projects.tsx"],"version":"5.6.2"}
|
||||
Reference in New Issue
Block a user