Skip to content

Commit 81afcb8

Browse files
committed
more server
1 parent 5ac8b8f commit 81afcb8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

apps/site/components/Downloads/DownloadButton/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
'use client';
2-
31
import { CloudArrowDownIcon } from '@heroicons/react/24/outline';
42
import classNames from 'classnames';
53
import type { FC, PropsWithChildren } from 'react';
64

5+
import { getClientContext } from '#site/client-context';
76
import Button from '#site/components/Common/Button';
8-
import { useClientContext } from '#site/hooks';
97
import type { NodeRelease } from '#site/types';
108
import { getNodeDownloadUrl } from '#site/util/url';
119
import { getUserPlatform } from '#site/util/userAgent';
@@ -18,7 +16,7 @@ const DownloadButton: FC<PropsWithChildren<DownloadButtonProps>> = ({
1816
release: { versionWithPrefix },
1917
children,
2018
}) => {
21-
const { os, bitness, architecture } = useClientContext();
19+
const { os, bitness, architecture } = getClientContext();
2220

2321
const platform = getUserPlatform(architecture, bitness);
2422
const downloadLink = getNodeDownloadUrl({ versionWithPrefix, os, platform });

apps/site/components/Downloads/DownloadLink.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
'use client';
2-
31
import type { FC, PropsWithChildren } from 'react';
42

3+
import { getClientContext } from '#site/client-context';
54
import LinkWithArrow from '#site/components/Common/LinkWithArrow';
6-
import { useClientContext } from '#site/hooks';
75
import type { DownloadKind, NodeRelease } from '#site/types';
86
import { getNodeDownloadUrl } from '#site/util/url';
97
import { getUserPlatform } from '#site/util/userAgent';
@@ -15,7 +13,7 @@ const DownloadLink: FC<PropsWithChildren<DownloadLinkProps>> = ({
1513
kind = 'installer',
1614
children,
1715
}) => {
18-
const { os, bitness, architecture } = useClientContext();
16+
const { os, bitness, architecture } = getClientContext();
1917

2018
const platform = getUserPlatform(architecture, bitness);
2119

0 commit comments

Comments
 (0)