File tree Expand file tree Collapse file tree 2 files changed +28
-22
lines changed Expand file tree Collapse file tree 2 files changed +28
-22
lines changed Original file line number Diff line number Diff line change @@ -63,25 +63,31 @@ export default function NextPrevButton({
63
63
< div className = 'h-auto w-1/2' > </ div >
64
64
) }
65
65
66
- < div className = 'h-auto w-1/2' >
67
- < div className = 'h-full cursor-pointer rounded border border-gray-200 p-4 text-center shadow-md transition-all duration-300 ease-in-out hover:border-gray-300 hover:shadow-lg dark:shadow-xl dark:drop-shadow-lg dark:hover:shadow-2xl lg:text-right' >
68
- < Link href = { nextURL } >
69
- < div className = 'text-primary dark:text-slate-300 flex flex-row-reverse gap-5 text-[18px]' >
70
- < Image
71
- src = { '/icons/arrow.svg' }
72
- height = { 10 }
73
- width = { 10 }
74
- alt = 'next icon '
75
- className = 'w-5'
76
- />
77
- < div className = 'my-auto inline font-bold uppercase ' > Up Next</ div >
78
- </ div >
79
- < div className = 'my-2 text-base font-medium text-slate-600 dark:text-slate-300' >
80
- { nextLabel }
81
- </ div >
82
- </ Link >
66
+ { nextURL && nextLabel ? (
67
+ < div className = 'h-auto w-1/2' >
68
+ < div className = 'h-full cursor-pointer rounded border border-gray-200 p-4 text-center shadow-md transition-all duration-300 ease-in-out hover:border-gray-300 hover:shadow-lg dark:shadow-xl dark:drop-shadow-lg dark:hover:shadow-2xl lg:text-right' >
69
+ < Link href = { nextURL } >
70
+ < div className = 'text-primary dark:text-slate-300 flex flex-row-reverse gap-5 text-[18px]' >
71
+ < Image
72
+ src = { '/icons/arrow.svg' }
73
+ height = { 10 }
74
+ width = { 10 }
75
+ alt = 'next icon '
76
+ className = 'w-5'
77
+ />
78
+ < div className = 'my-auto inline font-bold uppercase ' >
79
+ Up Next
80
+ </ div >
81
+ </ div >
82
+ < div className = 'my-2 text-base font-medium text-slate-600 dark:text-slate-300' >
83
+ { nextLabel }
84
+ </ div >
85
+ </ Link >
86
+ </ div >
83
87
</ div >
84
- </ div >
88
+ ) : (
89
+ < div className = 'h-auto w-1/2' > </ div >
90
+ ) }
85
91
</ div >
86
92
) ;
87
93
}
Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ export default function StaticMarkdownPage({
33
33
< Headline1 > { frontmatter . title } </ Headline1 >
34
34
< StyledMarkdown markdown = { content } />
35
35
< NextPrevButton
36
- prevLabel = { frontmatter . prev . label }
37
- prevURL = { frontmatter . prev . url }
38
- nextLabel = { frontmatter . next . label }
39
- nextURL = { frontmatter . next . url }
36
+ prevLabel = { frontmatter ? .prev ? .label }
37
+ prevURL = { frontmatter ? .prev ? .url }
38
+ nextLabel = { frontmatter ? .next ? .label }
39
+ nextURL = { frontmatter ? .next ? .url }
40
40
/>
41
41
< DocsHelp markdownFile = { markdownFile } />
42
42
</ SectionContext . Provider >
You can’t perform that action at this time.
0 commit comments