diff --git a/apps/web/global.d.ts b/apps/web/global.d.ts index 45fd732..9f3cc72 100644 --- a/apps/web/global.d.ts +++ b/apps/web/global.d.ts @@ -11,5 +11,6 @@ type Messages = typeof en; declare global { // Use type safe message keys with `next-intl` + // eslint-disable-next-line @typescript-eslint/no-empty-interface interface IntlMessages extends Messages {} } diff --git a/apps/web/src/components/user.tsx b/apps/web/src/components/user.tsx index 170521d..4fc1d0f 100644 --- a/apps/web/src/components/user.tsx +++ b/apps/web/src/components/user.tsx @@ -57,8 +57,10 @@ export function UserButton(props: { user?: Session["user"] }) {

EN

) } - onChange={(e) => { - e.target.checked ? changeLanguage("id") : changeLanguage("en"); + onChange={async (e) => { + e.target.checked + ? await changeLanguage("id") + : await changeLanguage("en"); }} > {t("language")}