@@ -3,18 +3,18 @@ import path from "path";
3
3
4
4
import matter from "gray-matter" ;
5
5
import type { Metadata } from "next" ;
6
- import Link from "next/link" ;
7
6
import { notFound } from "next/navigation" ;
8
7
import { MDXRemote } from "next-mdx-remote/rsc" ;
9
8
import { Suspense , cache } from "react" ;
10
9
11
- import { components , mdxOptions } from "@/components/mdx/mdx-components" ;
12
10
import { DocsHeader } from "@/components/docs/content/DocsHeader" ;
11
+ import { DocsNavigation } from "@/components/docs/content/DocsNavigation" ;
13
12
import { EditOnGitHub } from "@/components/docs/content/EditOnGitHub" ;
14
13
import { ErrorBoundary } from "@/components/docs/content/ErrorBoundary" ;
15
14
import { ReadingTime } from "@/components/docs/content/ReadingTime" ;
16
15
import { ShortLink } from "@/components/docs/content/ShortLink" ;
17
16
import { docsStructure } from "@/components/docs/sidebar/sidebar-structure" ;
17
+ import { components , mdxOptions } from "@/components/mdx/mdx-components" ;
18
18
19
19
interface DocMeta {
20
20
title : string ;
@@ -177,38 +177,7 @@ export default async function DocPage({ params }: Props) {
177
177
</ ErrorBoundary >
178
178
</ article >
179
179
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 } />
212
181
</ div >
213
182
) ;
214
183
}
0 commit comments