From 5ac8b8f2fcc2ff666793ec622aa9edccd106a3ff Mon Sep 17 00:00:00 2001 From: avivkeller Date: Sat, 18 Oct 2025 15:17:57 -0400 Subject: [PATCH 1/2] feat(server): more server components --- apps/site/components/Common/LinkTabs.tsx | 8 ++------ .../components/Common/Supporters/index.tsx | 2 -- .../src/Common/BaseLinkTabs/index.module.css | 10 +--------- .../src/Common/BaseLinkTabs/index.tsx | 18 +++++++----------- .../src/Common/Select/index.module.css | 3 ++- .../src/Common/Separator/index.tsx | 2 -- .../src/Containers/NavBar/index.tsx | 2 -- 7 files changed, 12 insertions(+), 33 deletions(-) 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/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 = ({ ))}
-
-