mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Rewrite URLs for app router folders
This commit is contained in:
24
components/layout/header/desktop-menu/desktop-menu.tsx
Normal file
24
components/layout/header/desktop-menu/desktop-menu.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function DesktopMenu({ items, locale }: { items: []; locale: string }) {
|
||||
const t = useTranslations('routes');
|
||||
return (
|
||||
<ul className="flex gap-6">
|
||||
{items.map((item: { title: string; slug: string }, i: number) => {
|
||||
return (
|
||||
<li key={i}>
|
||||
<Link
|
||||
className="font-medium underline-offset-2 hover:underline"
|
||||
href={`/${locale}/${t('category')}/${item.slug}`}
|
||||
>
|
||||
{item.title}
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user