fix to use defaultLocale

This commit is contained in:
tequ
2026-04-22 14:06:57 +09:00
parent b33fde5de1
commit c4c4be72be

View File

@@ -84,7 +84,7 @@ export default function Header(props) {
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
const pathname = props.url.pathname
const currentLocale = props.locale || 'en'
const currentLocale = props.locale || defaultLocale
const t = nav[currentLocale] || nav.en
function langUrl(code) {
@@ -164,7 +164,7 @@ export default function Header(props) {
const pathSegments = pathname.slice(1).split('/')
const activeSegment =
currentLocale !== 'en' ? pathSegments[1] : pathSegments[0]
currentLocale !== defaultLocale ? pathSegments[1] : pathSegments[0]
/* ── Shared class fragments ─────────────────────────────────────────────── */
const linkBase =