-
-
-
-
- {children}
-
-
-
-
+
{tabs}
{caption && (
{caption}
diff --git a/sites/shared/components/navigation/sitenav.mjs b/sites/shared/components/navigation/sitenav.mjs
index 124bbd8416c..17d7130627d 100644
--- a/sites/shared/components/navigation/sitenav.mjs
+++ b/sites/shared/components/navigation/sitenav.mjs
@@ -7,6 +7,7 @@ import orderBy from 'lodash.orderby'
import { icons } from 'shared/components/navigation/primary.mjs'
import { useTranslation } from 'next-i18next'
+export const ns = ['sections']
/*
* This returns only those children that are expected to show up
* in the side navigation. Specifically:
diff --git a/sites/shared/components/prev-next.mjs b/sites/shared/components/prev-next.mjs
index 50139cc48fd..bc4051b111b 100644
--- a/sites/shared/components/prev-next.mjs
+++ b/sites/shared/components/prev-next.mjs
@@ -38,6 +38,8 @@ export const PrevNext = ({ slug, noPrev = false }) => {
// Lookup the current slug in the LUT
const index = slugLut.indexOf(slug)
+ if (index < 0) return null
+
// Add 1 for the next page, unless it's the last page
const iNext = index === slugLut.length - 1 ? 0 : index + 1
diff --git a/sites/shared/components/sets/set-picker.mjs b/sites/shared/components/sets/set-picker.mjs
index bc844d95d84..c44e16aa60f 100644
--- a/sites/shared/components/sets/set-picker.mjs
+++ b/sites/shared/components/sets/set-picker.mjs
@@ -61,7 +61,7 @@ export const CuratedSetPicker = ({ design, language, href, clickHandler }) => {
const setTags = []
for (const lang of siteConfig.languages) {
const key = `tags${capitalize(lang)}`
- setTags.push(...set[key])
+ if (set[key]) setTags.push(...set[key])
}
let match = 0
for (const tag of filter) {
diff --git a/sites/shared/components/workbench/menus/design-options/index.mjs b/sites/shared/components/workbench/menus/design-options/index.mjs
index 6829d5707dd..b2836f4292f 100644
--- a/sites/shared/components/workbench/menus/design-options/index.mjs
+++ b/sites/shared/components/workbench/menus/design-options/index.mjs
@@ -73,7 +73,7 @@ export const DesignOptions = ({
const menuNs = [`o_${design}`, ...ns]
const optionsMenu = optionsMenuStructure(patternConfig.options)
const getDocsPath = (option) =>
- `patterns/${design}/options${option ? '/' + option.toLowerCase() : ''}`
+ `designs/${design}/options${option ? '/' + option.toLowerCase() : ''}`
return (
{
* Update navigation context with title and path
*/
useEffect(() => {
- // Only update if a new page was loaded
- if (path.join('/') !== slug) {
- setNavigation({
- title: pageTitle,
- locale,
- path,
- })
- setNavupdates(navupdates + 1)
- }
- }, [path, pageTitle, slug, locale, navupdates, setNavigation])
+ setNavigation({
+ title: pageTitle,
+ locale,
+ path,
+ })
+ setNavupdates((curState) => curState + 1)
+ }, [path, pageTitle, locale, setNavupdates, setNavigation])
/*
* Hotkeys (keyboard actions)