diff --git a/apps/site/components/Common/LinkTabs.tsx b/apps/site/components/Common/LinkTabs.tsx index 60c9c4d716668..f27904eaed6db 100644 --- a/apps/site/components/Common/LinkTabs.tsx +++ b/apps/site/components/Common/LinkTabs.tsx @@ -1,15 +1,11 @@ -'use client'; - import BaseLinkTabs from '@node-core/ui-components/Common/BaseLinkTabs'; import type { LinkTabsProps } from '@node-core/ui-components/Common/BaseLinkTabs'; import type { FC } from 'react'; import Link from '#site/components/Link'; -import { useRouter } from '#site/navigation.mjs'; -const LinkTabs: FC> = props => { - const { push } = useRouter(); - return push(value)} as={Link} {...props} />; +const LinkTabs: FC> = props => { + return ; }; export default LinkTabs; diff --git a/apps/site/components/Common/Supporters/index.tsx b/apps/site/components/Common/Supporters/index.tsx index 67f985b91c466..63e01509efe63 100644 --- a/apps/site/components/Common/Supporters/index.tsx +++ b/apps/site/components/Common/Supporters/index.tsx @@ -1,5 +1,3 @@ -'use client'; - import Avatar from '@node-core/ui-components/Common/AvatarGroup/Avatar'; import type { FC } from 'react'; diff --git a/apps/site/components/Downloads/DownloadButton/index.tsx b/apps/site/components/Downloads/DownloadButton/index.tsx index 54d77889e85bc..c280f2d8f83ac 100644 --- a/apps/site/components/Downloads/DownloadButton/index.tsx +++ b/apps/site/components/Downloads/DownloadButton/index.tsx @@ -1,11 +1,9 @@ -'use client'; - import { CloudArrowDownIcon } from '@heroicons/react/24/outline'; import classNames from 'classnames'; import type { FC, PropsWithChildren } from 'react'; +import { getClientContext } from '#site/client-context'; import Button from '#site/components/Common/Button'; -import { useClientContext } from '#site/hooks'; import type { NodeRelease } from '#site/types'; import { getNodeDownloadUrl } from '#site/util/url'; import { getUserPlatform } from '#site/util/userAgent'; @@ -18,7 +16,7 @@ const DownloadButton: FC> = ({ release: { versionWithPrefix }, children, }) => { - const { os, bitness, architecture } = useClientContext(); + const { os, bitness, architecture } = getClientContext(); const platform = getUserPlatform(architecture, bitness); const downloadLink = getNodeDownloadUrl({ versionWithPrefix, os, platform }); diff --git a/apps/site/components/Downloads/DownloadLink.tsx b/apps/site/components/Downloads/DownloadLink.tsx index 9dced0f04e026..c5887935d0ff4 100644 --- a/apps/site/components/Downloads/DownloadLink.tsx +++ b/apps/site/components/Downloads/DownloadLink.tsx @@ -1,9 +1,7 @@ -'use client'; - import type { FC, PropsWithChildren } from 'react'; +import { getClientContext } from '#site/client-context'; import LinkWithArrow from '#site/components/Common/LinkWithArrow'; -import { useClientContext } from '#site/hooks'; import type { DownloadKind, NodeRelease } from '#site/types'; import { getNodeDownloadUrl } from '#site/util/url'; import { getUserPlatform } from '#site/util/userAgent'; @@ -15,7 +13,7 @@ const DownloadLink: FC> = ({ kind = 'installer', children, }) => { - const { os, bitness, architecture } = useClientContext(); + const { os, bitness, architecture } = getClientContext(); const platform = getUserPlatform(architecture, bitness); diff --git a/packages/ui-components/src/Common/BaseLinkTabs/index.module.css b/packages/ui-components/src/Common/BaseLinkTabs/index.module.css index b8375d692a6c6..1163801c4fd52 100644 --- a/packages/ui-components/src/Common/BaseLinkTabs/index.module.css +++ b/packages/ui-components/src/Common/BaseLinkTabs/index.module.css @@ -38,13 +38,5 @@ } .tabsSelect { - @apply sm:visible - md:hidden; - - > span { - @apply max-xs:flex - my-6 - hidden - w-full; - } + @apply md:hidden; } diff --git a/packages/ui-components/src/Common/BaseLinkTabs/index.tsx b/packages/ui-components/src/Common/BaseLinkTabs/index.tsx index 81ec353f178c7..fd39e5fd8a234 100644 --- a/packages/ui-components/src/Common/BaseLinkTabs/index.tsx +++ b/packages/ui-components/src/Common/BaseLinkTabs/index.tsx @@ -1,9 +1,9 @@ import type { FC, PropsWithChildren } from 'react'; -import Select from '#ui/Common/Select'; import type { LinkLike } from '#ui/types'; import styles from './index.module.css'; +import StatelessSelect from '../Select/StatelessSelect'; type LinkTab = { key: string; label: string; link: string }; @@ -12,7 +12,6 @@ export type LinkTabsProps = PropsWithChildren<{ tabs: Array; activeTab: string; as?: LinkLike; - onSelect: (value: string) => void; }>; const BaseLinkTabs: FC = ({ @@ -21,7 +20,6 @@ const BaseLinkTabs: FC = ({ activeTab, children, as: Component = 'a', - onSelect, }) => ( <>
@@ -37,14 +35,12 @@ const BaseLinkTabs: FC = ({ ))}
-
-