Skip to content

Commit

Permalink
Refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
shibomb committed Oct 8, 2024
1 parent 5fd71ad commit 6b3eb25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,13 @@ export const generateJumpToState = async (
// Loop through each category and add entries to the jumpToLinks
for (const category of categories ?? []) {
const categoryLinks = [] as JumpToLink[];
const categoryLabel = getCategoryLabel(category);
categoryLinks.push({
label: getCategoryLabel(category),
label: categoryLabel,
url:
collectionType === "examples"
? `/${collectionType}#${getCategoryLabel(category).toLocaleLowerCase()}`
: `/${collectionType}#${category}`,
? `/${collectionType}/#${categoryLabel.toLowerCase()}`
: `/${collectionType}/#${category}`,
current: false,
});

Expand Down

0 comments on commit 6b3eb25

Please sign in to comment.