Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit b091cb2

Browse files
committed
Revert "style: Hide download button from header in mobile view"
This reverts commit 3dcc85c.
1 parent 2f4964f commit b091cb2

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

src/components/Header/__tests__/__snapshots__/header.test.tsx.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,16 @@ exports[`Tests for Header component renders shorter menu items for mobile 1`] =
316316
Docs
317317
</a>
318318
</li>
319+
<li
320+
class="nav__tabs"
321+
>
322+
<a
323+
class="activeStyleTab"
324+
href="/download"
325+
>
326+
Download
327+
</a>
328+
</li>
319329
<li
320330
class="nav__tabs"
321331
>

src/components/Header/index.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import logoDark from '../../images/logos/nodejs-logo-dark-mode.svg';
66
import { useMediaQuery } from '../../hooks/useMediaQuery';
77

88
const Header = (): JSX.Element => {
9-
const isMobile = useMediaQuery('(max-width: 768px)');
9+
const isMobile = useMediaQuery('(max-width: 870px)');
1010

1111
const handleThemeOnClick = (
1212
e: MouseEvent<HTMLButtonElement, Event> | KeyboardEvent<HTMLButtonElement>,
@@ -62,18 +62,16 @@ const Header = (): JSX.Element => {
6262
{isMobile ? 'Docs' : 'Documentation'}
6363
</a>
6464
</li>
65-
{!isMobile && (
66-
<li className="nav__tabs">
67-
<Link
68-
to="/download"
69-
className="activeStyleTab"
70-
activeClassName="active"
71-
partiallyActive
72-
>
73-
Download
74-
</Link>
75-
</li>
76-
)}
65+
<li className="nav__tabs">
66+
<Link
67+
to="/download"
68+
className="activeStyleTab"
69+
activeClassName="active"
70+
partiallyActive
71+
>
72+
Download
73+
</Link>
74+
</li>
7775
<li className="nav__tabs">
7876
<a
7977
href="https://nodejs.org/en/get-involved/"

0 commit comments

Comments
 (0)