({
label,
page,
previous = false,
}: {
label: string
page: { href: string; title: string }
previous?: boolean
})
| 11 | import DiscordIcon from '@/icons/discord' |
| 12 | |
| 13 | function PageLink({ |
| 14 | label, |
| 15 | page, |
| 16 | previous = false, |
| 17 | }: { |
| 18 | label: string |
| 19 | page: { href: string; title: string } |
| 20 | previous?: boolean |
| 21 | }) { |
| 22 | return ( |
| 23 | <> |
| 24 | <Link href={page.href} passHref> |
| 25 | <Button aria-label={`${label}: ${page.title}`} variant="secondary"> |
| 26 | {previous ? <ChevronLeft size={18} /> : null} |
| 27 | {label} |
| 28 | {!previous ? <ChevronRight size={18} /> : null} |
| 29 | </Button> |
| 30 | </Link> |
| 31 | <Link |
| 32 | href={page.href} |
| 33 | tabIndex={-1} |
| 34 | aria-hidden="true" |
| 35 | className="text-base font-semibold text-zinc-900 transition hover:text-zinc-600 dark:text-white dark:hover:text-zinc-300" |
| 36 | > |
| 37 | {page.title} |
| 38 | </Link> |
| 39 | </> |
| 40 | ) |
| 41 | } |
| 42 | |
| 43 | function PageNavigation() { |
| 44 | let pathname = usePathname() |
nothing calls this directly
no outgoing calls
no test coverage detected