diff --git a/package.json b/package.json
index 0cfb066..3be7aea 100644
--- a/package.json
+++ b/package.json
@@ -17,9 +17,9 @@
"dependencies": {
"@reduxjs/toolkit": "^2.2.5",
"@types/react-redux": "^7.1.33",
- "lucide-react": "^0.387.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
+ "react-icons": "^5.2.1",
"react-redux": "^9.1.2",
"react-router-dom": "^6.23.1",
"sass": "^1.77.2"
diff --git a/src/components/navbar/Navbar.tsx b/src/components/navbar/Navbar.tsx
index cf0fda9..4516326 100644
--- a/src/components/navbar/Navbar.tsx
+++ b/src/components/navbar/Navbar.tsx
@@ -7,25 +7,38 @@ function Navbar() {
const closeBtn = document.getElementById('close');
const overlay = document.getElementById('overlay');
const container = document.getElementById('humbergerContainer');
+ const hideScrollbar = () => {
+ document.body.style.overflow = 'hidden';
+ };
+
+ const showScrollbar = () => {
+ document.body.style.overflow = 'auto';
+ };
closeBtn?.addEventListener('click', () => {
overlay?.classList.add('-translate-x-full');
container?.classList.add('-translate-x-full');
+ showScrollbar()
});
humbergurBtn?.addEventListener('click', () => {
overlay?.classList.remove('-translate-x-full');
container?.classList.remove('-translate-x-full');
+ hideScrollbar()
});
- overlay?.addEventListener('click', () => {
+ overlay?.addEventListener('click', (e) => {
+ if (e.target !== e.currentTarget) {
+ return;
+ }
overlay?.classList.add('-translate-x-full');
container?.classList.add('-translate-x-full');
+ showScrollbar()
});
}, []);
return (
-
-
+
+
-
+
{/* close */}
-
+