diff --git a/app/[locale]/[[...path]]/page.tsx b/app/[locale]/[[...path]]/page.tsx index b11084be9dc12..2f4e2a7947c5d 100644 --- a/app/[locale]/[[...path]]/page.tsx +++ b/app/[locale]/[[...path]]/page.tsx @@ -37,6 +37,8 @@ export const generateMetadata = async (c: DynamicParams) => { export const generateStaticParams = async () => { const paths: DynamicStaticPaths[] = []; + // We don't need to compute all possible paths on regular builds + // as we benefit from Next.js's ISR (Incremental Static Regeneration) if (!ENABLE_STATIC_EXPORT) { return []; } diff --git a/components/Docs/NodeApiVersionLinks.tsx b/components/Docs/NodeApiVersionLinks.tsx index ee2cd71175532..5ac9f7d7ade54 100644 --- a/components/Docs/NodeApiVersionLinks.tsx +++ b/components/Docs/NodeApiVersionLinks.tsx @@ -1,21 +1,13 @@ -import { useMemo } from 'react'; - -import { useNodeReleases } from '@/hooks/useNodeReleases'; import { DOCS_URL } from '@/next.constants.mjs'; +import { releaseData } from '@/next.json.mjs'; const NodeApiVersionLinks = () => { - const { releases } = useNodeReleases(); - - const mappedReleases = useMemo( - () => - // Gets all major releases without the 0x release as those are divided on 0.12x and 0.10x - releases.slice(0, -1).map(({ major }) => ( -
  • - Node.js {major}.x -
  • - )), - [releases] - ); + // Gets all major releases without the 0x release as those are divided on 0.12x and 0.10x + const mappedReleases = releaseData.slice(0, -1).map(({ major }) => ( +
  • + Node.js {major}.x +
  • + )); return (