Set list mode query for stigmata list link in stigmata set page
This commit is contained in:
@@ -4,9 +4,10 @@ import Icon from '@mdi/react'
|
||||
import { NavLink, Flex } from '@theme-ui/components'
|
||||
import NextLink from 'next/link'
|
||||
import React from 'react'
|
||||
import { UrlObject, format as formatUrl } from 'url'
|
||||
|
||||
interface BreadcrumbItem {
|
||||
href: string
|
||||
href: string | UrlObject
|
||||
label: string
|
||||
}
|
||||
|
||||
@@ -33,7 +34,11 @@ const Breadcrumb = ({ items }: BreadcrumbProps) => {
|
||||
</NextLink>
|
||||
{items.map((item) => {
|
||||
return (
|
||||
<React.Fragment key={item.href}>
|
||||
<React.Fragment
|
||||
key={
|
||||
typeof item.href === 'string' ? item.href : formatUrl(item.href)
|
||||
}
|
||||
>
|
||||
<Icon size={0.8} path={mdiChevronRight} />
|
||||
<NextLink passHref href={item.href}>
|
||||
<NavLink>{item.label}</NavLink>
|
||||
|
||||
@@ -26,7 +26,13 @@ const StigmataSetPage = ({
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{ href: '/honkai3rd', label: 'Honkai 3rd' },
|
||||
{ href: '/honkai3rd/stigmata', label: 'Stigmata' },
|
||||
{
|
||||
href: {
|
||||
pathname: `/honkai3rd/stigmata`,
|
||||
query: { list: 'set' },
|
||||
},
|
||||
label: 'Stigmata',
|
||||
},
|
||||
{
|
||||
href: `/honkai3rd/stigmata/${stigmataSet.id}-set`,
|
||||
label: `${stigmataSet.name} Set`,
|
||||
|
||||
Reference in New Issue
Block a user