Skip to content

Commit 7eeaf44

Browse files
committed
update props to fix type errors
1 parent 3b60b3c commit 7eeaf44

File tree

1 file changed

+12
-13
lines changed
  • app/src/app/[locale]/serverAction

1 file changed

+12
-13
lines changed

app/src/app/[locale]/serverAction/page.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,22 @@ export async function generateMetadata({ params }: { params: RouteParams }) {
2626
return meta;
2727
}
2828

29-
type Props = {
30-
locale?: string;
31-
};
29+
interface Props {
30+
params: RouteParams;
31+
}
3232

33-
export function SimpleForm({ locale }: Props) {
33+
export default function SimpleForm({ params }: Props) {
34+
const { locale } = params;
3435
const messages = useMessages();
3536
const t = useTranslations("serverAction");
3637

3738
return (
38-
<>
39-
<NextIntlClientProvider
40-
locale={locale}
41-
messages={pick(messages, "serverAction")}
42-
>
43-
<h1>{t("title")}</h1>
44-
<ClientForm />
45-
</NextIntlClientProvider>
46-
</>
39+
<NextIntlClientProvider
40+
locale={locale}
41+
messages={pick(messages, "serverAction")}
42+
>
43+
<h1>{t("title")}</h1>
44+
<ClientForm />
45+
</NextIntlClientProvider>
4746
);
4847
}

0 commit comments

Comments
 (0)