Frontend Track • Beginner • 2 mins review

Feat: Show keyboard shortcut hints on resize

Adds a small resize listener so the shortcut hint component can switch between compact and expanded layouts.

Scenario Goal & Context

Goal: Listen for window resize events and update the component state with the latest screen width.

Background: Design wants the shortcut help box to collapse on narrow screens and expand again on wider ones.

Changed Files (1)

  • src/components/ShortcutHint.tsx +4 -0

Ready to practice reviewing this PR?

Open this scenario inside the interactive DiffSense simulator to leave inline comments and receive an automated score.

Start Review Session