From 2fd8df6adca4edca46b93ada5c7f1155a150194a Mon Sep 17 00:00:00 2001 From: mrevanzak Date: Wed, 19 Jun 2024 22:53:08 +0700 Subject: [PATCH] style: eslint fix --- apps/web/global.d.ts | 1 + apps/web/src/components/user.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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")}