Skip to content

Commit

Permalink
show all categories in example page jump to links
Browse files Browse the repository at this point in the history
  • Loading branch information
outofambit committed Apr 30, 2024
1 parent 315ca28 commit d9ae508
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/pages/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,13 @@ export const generateJumpToState = async (
}) as JumpToLink,
),
);

const hasCurrent = categoryLinks.some((link) => link.current);
// If the current entry is in this category, move this category to the top
if (hasCurrent) {
jumpToLinks.unshift(...categoryLinks);
} else {
jumpToLinks.push(...categoryLinks);
}
}
const hasCurrent = categoryLinks.some((link) => link.current);
// If the current entry is in this category, move this category to the top
if (hasCurrent) {
jumpToLinks.unshift(...categoryLinks);
} else {
jumpToLinks.push(...categoryLinks);
}
}

Expand Down

0 comments on commit d9ae508

Please sign in to comment.