File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
apps/site/components/Downloads Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1- 'use client' ;
2-
31import { CloudArrowDownIcon } from '@heroicons/react/24/outline' ;
42import classNames from 'classnames' ;
53import type { FC , PropsWithChildren } from 'react' ;
64
5+ import { getClientContext } from '#site/client-context' ;
76import Button from '#site/components/Common/Button' ;
8- import { useClientContext } from '#site/hooks' ;
97import type { NodeRelease } from '#site/types' ;
108import { getNodeDownloadUrl } from '#site/util/url' ;
119import { 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 } ) ;
Original file line number Diff line number Diff line change 1- 'use client' ;
2-
31import type { FC , PropsWithChildren } from 'react' ;
42
3+ import { getClientContext } from '#site/client-context' ;
54import LinkWithArrow from '#site/components/Common/LinkWithArrow' ;
6- import { useClientContext } from '#site/hooks' ;
75import type { DownloadKind , NodeRelease } from '#site/types' ;
86import { getNodeDownloadUrl } from '#site/util/url' ;
97import { 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
You can’t perform that action at this time.
0 commit comments