fix(infra): resolve local directus service matching, improve branding script flexibility, and cleanup build artifacts
This commit is contained in:
@@ -46,22 +46,10 @@ export default function Header() {
|
||||
return segments.join('/');
|
||||
};
|
||||
|
||||
const [productsSlug, setProductsSlug] = useState('products');
|
||||
|
||||
useEffect(() => {
|
||||
// We can't use mapFileSlugToTranslated directly in client components easily without an API or similar
|
||||
// For now, let's just check the locale
|
||||
if (currentLocale === 'de') {
|
||||
setProductsSlug('produkte');
|
||||
} else {
|
||||
setProductsSlug('products');
|
||||
}
|
||||
}, [currentLocale]);
|
||||
|
||||
const menuItems = [
|
||||
{ label: t('home'), href: '/' },
|
||||
{ label: t('team'), href: '/team' },
|
||||
{ label: t('products'), href: `/${productsSlug}` },
|
||||
{ label: t('products'), href: currentLocale === 'de' ? '/produkte' : '/products' },
|
||||
{ label: t('blog'), href: '/blog' },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user