Iterated with translations

This commit is contained in:
Henrik Larsson
2023-05-03 10:20:25 +02:00
parent cca3250557
commit a1ae2357db
8 changed files with 695 additions and 33 deletions

View File

@@ -1,15 +1,22 @@
'use client';
import LocaleSwitcher from 'components/ui/locale-switcher';
import LocaleSwitcher from 'components/ui/locale-switcher/locale-switcher';
import { useTranslations } from 'next-intl';
interface PageProps {
params: {
locale: string
}
}
export default function Index() {
export default function Index({params: {locale}} : PageProps) {
const t = useTranslations('Index');
return (
<div>
<h1>{t('title')}</h1>
<LocaleSwitcher />
<LocaleSwitcher currentLocale={locale} />
</div>
)
}