Skip to content

Commit

Permalink
style: eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Jun 19, 2024
1 parent 7c14947 commit 2fd8df6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/web/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
}
6 changes: 4 additions & 2 deletions apps/web/src/components/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ export function UserButton(props: { user?: Session["user"] }) {
<p className={cn(className, "text-[8px]")}>EN</p>
)
}
onChange={(e) => {
e.target.checked ? changeLanguage("id") : changeLanguage("en");
onChange={async (e) => {
e.target.checked
? await changeLanguage("id")
: await changeLanguage("en");
}}
>
{t("language")}
Expand Down

0 comments on commit 2fd8df6

Please sign in to comment.