@@ -3,18 +3,18 @@ import path from "path";
33
44import matter from "gray-matter" ;
55import type { Metadata } from "next" ;
6- import Link from "next/link" ;
76import { notFound } from "next/navigation" ;
87import { MDXRemote } from "next-mdx-remote/rsc" ;
98import { Suspense , cache } from "react" ;
109
11- import { components , mdxOptions } from "@/components/mdx/mdx-components" ;
1210import { DocsHeader } from "@/components/docs/content/DocsHeader" ;
11+ import { DocsNavigation } from "@/components/docs/content/DocsNavigation" ;
1312import { EditOnGitHub } from "@/components/docs/content/EditOnGitHub" ;
1413import { ErrorBoundary } from "@/components/docs/content/ErrorBoundary" ;
1514import { ReadingTime } from "@/components/docs/content/ReadingTime" ;
1615import { ShortLink } from "@/components/docs/content/ShortLink" ;
1716import { docsStructure } from "@/components/docs/sidebar/sidebar-structure" ;
17+ import { components , mdxOptions } from "@/components/mdx/mdx-components" ;
1818
1919interface DocMeta {
2020 title : string ;
@@ -177,38 +177,7 @@ export default async function DocPage({ params }: Props) {
177177 </ ErrorBoundary >
178178 </ article >
179179
180- < div className = "mx-auto mt-12 flex w-full max-w-5xl items-center justify-between gap-2" >
181- { prev ? (
182- < Link
183- href = { prev . path }
184- className = "group flex items-center gap-1 text-sm font-normal text-gray-500 transition-colors hover:text-gray-700"
185- prefetch = { true }
186- aria-label = { `Previous: ${ prev . title } ` }
187- >
188- < span className = "inline-block align-middle transition-transform group-hover:-translate-x-0.5" >
189- ←
190- </ span >
191- < span className = "truncate" > { prev . title } </ span >
192- </ Link >
193- ) : (
194- < div />
195- ) }
196- { next ? (
197- < Link
198- href = { next . path }
199- className = "group flex items-center justify-end gap-1 text-sm font-normal text-gray-500 transition-colors hover:text-gray-700"
200- prefetch = { true }
201- aria-label = { `Next: ${ next . title } ` }
202- >
203- < span className = "truncate" > { next . title } </ span >
204- < span className = "inline-block align-middle transition-transform group-hover:translate-x-0.5" >
205- →
206- </ span >
207- </ Link >
208- ) : (
209- < div />
210- ) }
211- </ div >
180+ < DocsNavigation prev = { prev } next = { next } />
212181 </ div >
213182 ) ;
214183}
0 commit comments