({
dir,
next,
nextLabel,
prev,
previousLabel,
}: PaginationViewProps)
| 83 | } |
| 84 | |
| 85 | export default function PaginationView({ |
| 86 | dir, |
| 87 | next, |
| 88 | nextLabel, |
| 89 | prev, |
| 90 | previousLabel, |
| 91 | }: PaginationViewProps) { |
| 92 | const isRtl = dir === "rtl"; |
| 93 | |
| 94 | if (!prev && !next) { |
| 95 | return null; |
| 96 | } |
| 97 | |
| 98 | return ( |
| 99 | <nav |
| 100 | aria-label="Page navigation" |
| 101 | className="not-content print:hidden grid grid-cols-1 gap-3 min-[760px]:grid-cols-2" |
| 102 | dir={dir} |
| 103 | > |
| 104 | {prev ? ( |
| 105 | <PaginationCard |
| 106 | href={prev.href} |
| 107 | isRtl={isRtl} |
| 108 | label={previousLabel} |
| 109 | title={prev.label} |
| 110 | type="prev" |
| 111 | /> |
| 112 | ) : ( |
| 113 | <span aria-hidden="true" className="hidden min-[760px]:block" /> |
| 114 | )} |
| 115 | {next ? ( |
| 116 | <PaginationCard |
| 117 | href={next.href} |
| 118 | isRtl={isRtl} |
| 119 | label={nextLabel} |
| 120 | title={next.label} |
| 121 | type="next" |
| 122 | /> |
| 123 | ) : null} |
| 124 | </nav> |
| 125 | ); |
| 126 | } |
nothing calls this directly
no outgoing calls
no test coverage detected