Compare commits
No commits in common. "be98d93c9a653a7f56734f7dd8920694137d1236" and "27ba0f74a11d61109b158b0d3f4be8d488ef22ac" have entirely different histories.
be98d93c9a
...
27ba0f74a1
@ -40,9 +40,9 @@ function PageLink({
|
||||
>
|
||||
<p className="flex flex-col gap-0">
|
||||
{pageCategory && (
|
||||
<span className="text-violet-600 dark:text-violet-400 text-sm mb-1 leading-3">{pageCategory.title}</span>
|
||||
<span className="text-violet-600 dark:text-violet-400 text-sm -mb-3">{pageCategory.title}</span>
|
||||
)}
|
||||
<span className="leading-4">{title}</span>
|
||||
<span>{title}</span>
|
||||
</p>
|
||||
<ArrowIcon className={clsx("h-6 w-6 flex-none fill-current", dir === "previous" && "-scale-x-100")} />
|
||||
</Link>
|
||||
@ -65,13 +65,7 @@ export function PrevNextLinks() {
|
||||
if (linkIndex === -1) return [null, null];
|
||||
|
||||
const previousPage = allLinks[linkIndex - 1] || null;
|
||||
let nextPage = allLinks[linkIndex + 1] || null;
|
||||
|
||||
// In case the next page is the same as the current page (in subitems),
|
||||
// we need to skip it to get the correct next page.
|
||||
if (nextPage.href === urlPathname) {
|
||||
nextPage = allLinks[linkIndex + 2] || null;
|
||||
}
|
||||
const nextPage = allLinks[linkIndex + 1] || null;
|
||||
|
||||
return [previousPage, nextPage];
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user