import { getTranslations } from 'next-intl/server'; import type { FC, PropsWithChildren } from 'react'; import { useClientContext } from '@/hooks/react-server'; import getReleaseData from '@/next-data/releaseData'; import { ReleaseProvider } from '@/providers/releaseProvider'; import type { NodeReleaseStatus } from '@/types'; import { getDownloadCategory, mapCategoriesToTabs } from '@/util/downloadUtils'; import LinkTabs from './Common/LinkTabs'; import WithNodeRelease from './withNodeRelease'; const WithDownloadCategories: FC = async ({ children }) => { const t = await getTranslations(); const releases = await getReleaseData(); const { pathname } = useClientContext(); const { page, category, subCategory } = getDownloadCategory(pathname); const initialRelease: Array = pathname.includes('current') ? ['Current'] : ['Active LTS', 'Maintenance LTS']; return ( {({ release }) => ( {children} )} ); }; export default WithDownloadCategories;