Skip to content

Commit 6b3eb25

Browse files
committed
Refactoring.
1 parent 5fd71ad commit 6b3eb25

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pages/_utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,13 @@ export const generateJumpToState = async (
365365
// Loop through each category and add entries to the jumpToLinks
366366
for (const category of categories ?? []) {
367367
const categoryLinks = [] as JumpToLink[];
368+
const categoryLabel = getCategoryLabel(category);
368369
categoryLinks.push({
369-
label: getCategoryLabel(category),
370+
label: categoryLabel,
370371
url:
371372
collectionType === "examples"
372-
? `/${collectionType}#${getCategoryLabel(category).toLocaleLowerCase()}`
373-
: `/${collectionType}#${category}`,
373+
? `/${collectionType}/#${categoryLabel.toLowerCase()}`
374+
: `/${collectionType}/#${category}`,
374375
current: false,
375376
});
376377

0 commit comments

Comments
 (0)