File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
sdk-explorer/src/document-collections/DocumentTable Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export default function DocumentTable() {
82
82
return (
83
83
< ExampleLayout
84
84
title = 'Document table'
85
- codeUrl = 'https://github.com/sanity-io/sdk-examples/blob/main/sdk-explorer/src/document-collections/PreviewGrid/PreviewGrid .tsx'
85
+ codeUrl = 'https://github.com/sanity-io/sdk-examples/blob/main/sdk-explorer/src/document-collections/DocumentTable/DocumentTable .tsx'
86
86
hooks = { [ 'usePaginatedList' , 'useProjection' ] }
87
87
styling = 'Tailwind'
88
88
>
@@ -106,7 +106,7 @@ export default function DocumentTable() {
106
106
{ /* Table navigation */ }
107
107
< nav className = 'flex justify-between items-center my-8' >
108
108
< button
109
- className = ' rounded-sm px-4 py-2 bg-blue-500 text-white font-medium hover:bg-blue-700 transition'
109
+ className = { ` rounded-sm px-4 py-2 bg-blue-500 text-white font-medium transition ${ ! hasPreviousPage ? 'opacity-50 cursor-not-allowed' : ' hover:bg-blue-700' } ` }
110
110
onClick = { previousPage }
111
111
disabled = { ! hasPreviousPage }
112
112
>
@@ -116,7 +116,7 @@ export default function DocumentTable() {
116
116
Page { currentPage } /{ totalPages }
117
117
</ div >
118
118
< button
119
- className = ' rounded-sm px-4 py-2 bg-blue-500 text-white font-medium hover:bg-blue-700 transition'
119
+ className = { ` rounded-sm px-4 py-2 bg-blue-500 text-white font-medium transition ${ ! hasNextPage ? 'opacity-50 cursor-not-allowed' : ' hover:bg-blue-700' } ` }
120
120
onClick = { nextPage }
121
121
disabled = { ! hasNextPage }
122
122
>
You can’t perform that action at this time.
0 commit comments