Skip to content

refactor: modernize menu.js and deduplicate event handlers#280

Merged
andygrunwald merged 1 commit intomainfrom
refactor/modernize-menu-js
Mar 21, 2026
Merged

refactor: modernize menu.js and deduplicate event handlers#280
andygrunwald merged 1 commit intomainfrom
refactor/modernize-menu-js

Conversation

@andygrunwald
Copy link
Member

Summary

  • Replace var with const for modern JavaScript best practices
  • Extract shared toggleMenu() function to eliminate three near-identical event listener blocks
  • Use forEach instead of manual for-loops
  • Reduces file from 40 lines to 23 lines with identical behavior

Test plan

  • astro build succeeds
  • Verify mobile hamburger menu opens, closes via X button, and closes via backdrop click

🤖 Generated with Claude Code

Replace var with const, extract shared toggleMenu function to
eliminate three near-identical event listener blocks, and use
forEach instead of manual for-loops.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link

netlify bot commented Mar 21, 2026

Deploy Preview for lively-frangollo-e43a02 ready!

Name Link
🔨 Latest commit fecee62
🔍 Latest deploy log https://app.netlify.com/projects/lively-frangollo-e43a02/deploys/69bf00cf6b560000084df287
😎 Deploy Preview https://deploy-preview-280--lively-frangollo-e43a02.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@andygrunwald andygrunwald merged commit c4ac4b0 into main Mar 21, 2026
5 checks passed
@andygrunwald andygrunwald deleted the refactor/modernize-menu-js branch March 21, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant