HomePhabricator
Diffusion Comm 82dc438d9a30

[landing] fix mobile nav still being shown when window resizes

Description

[landing] fix mobile nav still being shown when window resizes

Summary:
As I was doing some tests on the new Header I noticed that if a user resized the window while the mobile nav header was acitve, the moible nav header would still be open. This diff fixes this problem by adding a resize event listener that checks if the window width is more than 848px (the breakpoint that @ted and I determined earlier) and if the window is ever bigger than 848px sets the showMobileNav state to false

Depends on D7869

Test Plan:
Please watch the demo videos below:

Before:

After:

Reviewers: atul, kamil

Reviewed By: atul

Subscribers: ted, ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7870

Details

Provenance
ginsuAuthored on May 16 2023, 4:10 AM
Reviewer
atul
Differential Revision
D7870: [landing] fix mobile nav still being shown when window resizes
Parents
rCOMMf4fd228b7c06: [landing] show close icon when mobile nav is active
Branches
Unknown
Tags
Unknown