Summary
Several UI decisions (tooltip vs toast, collapsed vs expanded nav) depend on whether the user is on a mobile viewport. A shared helper that reads the window width and returns a boolean should be used consistently instead of inline media query checks scattered across components.
Scope
- Add
useIsMobile(): boolean React hook using a window.matchMedia listener with a 768px breakpoint
- Hook updates correctly when the viewport is resized
- Cleans up the media query listener on unmount
- Add unit tests mocking
window.matchMedia for mobile and desktop widths
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Several UI decisions (tooltip vs toast, collapsed vs expanded nav) depend on whether the user is on a mobile viewport. A shared helper that reads the window width and returns a boolean should be used consistently instead of inline media query checks scattered across components.
Scope
useIsMobile(): booleanReact hook using awindow.matchMedialistener with a 768px breakpointwindow.matchMediafor mobile and desktop widthsAcceptance Criteria
truefor viewport width below 768pxfalsefor viewport width at or above 768pxETA: 12 hours
Coordinate on Telegram