From aed7b924f131f7c19c073705f1583da950d5f77d Mon Sep 17 00:00:00 2001 From: melvinchia3636 Date: Wed, 24 Jun 2026 01:35:28 +0800 Subject: [PATCH] fix: minor type fixes --- apps/web/src/core/accountSettings/modals/ModifyModal.tsx | 4 ++-- packages/ui/.storybook/i18n.ts | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/web/src/core/accountSettings/modals/ModifyModal.tsx b/apps/web/src/core/accountSettings/modals/ModifyModal.tsx index 7622d83af..2a7104c88 100644 --- a/apps/web/src/core/accountSettings/modals/ModifyModal.tsx +++ b/apps/web/src/core/accountSettings/modals/ModifyModal.tsx @@ -40,13 +40,13 @@ function ModifyModal({ const mutation = useMutation( forgeAPI.user.settings.updateProfile.mutationOptions({ - onSuccess: (_: never, newData: UserData) => { + onSuccess: (_, newData) => { if (!userData) return if (id === 'email') { toast.info('A verification email has been sent to your new email.') } else { - setUserData((oldData: UserData) => { + setUserData(oldData => { if (!oldData) return null return { ...oldData, ...newData.data } as UserData diff --git a/packages/ui/.storybook/i18n.ts b/packages/ui/.storybook/i18n.ts index 789b33faf..32861163b 100644 --- a/packages/ui/.storybook/i18n.ts +++ b/packages/ui/.storybook/i18n.ts @@ -35,10 +35,7 @@ i18n return } - if ( - !['en', 'zh', 'zh-TW', 'zh-CN', 'ms'].includes(langs[0]) || - !namespaces.filter(e => e && e !== 'undefined').length - ) { + if (!namespaces.filter(e => e && e !== 'undefined').length) { return } @@ -51,7 +48,7 @@ i18n return forgeAPI.locales.getLocale .setHost(import.meta.env.VITE_API_HOST) .input({ - lang: langs[0] as 'en' | 'zh' | 'zh-TW' | 'zh-CN' | 'ms', + lang: langs[0], namespace: namespace as 'apps' | 'common', subnamespace: subnamespace }).endpoint