Skip to content

Commit dc7c4ab

Browse files
Add: Comment to explain the need for the function
1 parent aa41120 commit dc7c4ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/Nav.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import styles from "../styles/ResponsiveNavbar.module.css";
55
export default function Nav() {
66
const [active, setActive] = useState(false);
77

8+
//This function fixes the Navlinks position if the hamburger menu is left open while resizing the window
89
useEffect(() => {
910
function setTrueSize() {
1011
if (window.innerWidth > 768) setActive(false);

0 commit comments

Comments
 (0)