diff --git a/src/components/Layout/Page.tsx b/src/components/Layout/Page.tsx index c3224e5174a..e65b0ebc998 100644 --- a/src/components/Layout/Page.tsx +++ b/src/components/Layout/Page.tsx @@ -52,6 +52,12 @@ export function Page({ cleanedPath, routeTree ); + const getNavigationRoutes = () => { + if (section !== 'blog') return { nextRoute, prevRoute }; + return { nextRoute: prevRoute, prevRoute: nextRoute }; // Swap for blog + }; + + const { nextRoute: finalNextRoute, prevRoute: finalPrevRoute } = getNavigationRoutes(); const title = meta.title || route?.title || ''; const version = meta.version; const description = meta.description || route?.description || ''; @@ -89,8 +95,8 @@ export function Page({ {!isBlogIndex && ( )}