mirror of
https://github.com/Xahau/xahau-web.git
synced 2026-08-22 18:40:51 +00:00
fix to use defaultLocale
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user