From bc43e3a9fe6340c81bb79487945fe10005f03241 Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Wed, 6 Nov 2024 14:52:47 +0800 Subject: [PATCH] card locale --- web/app/components/plugins/card/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app/components/plugins/card/index.tsx b/web/app/components/plugins/card/index.tsx index b9ff8ecfda..c7acfbe428 100644 --- a/web/app/components/plugins/card/index.tsx +++ b/web/app/components/plugins/card/index.tsx @@ -22,6 +22,7 @@ export type Props = { footer?: React.ReactNode isLoading?: boolean loadingFileName?: string + locale?: string } const Card = ({ @@ -35,8 +36,10 @@ const Card = ({ footer, isLoading = false, loadingFileName, + locale: localeFromProps, }: Props) => { - const locale = useGetLanguage() + const defaultLocale = useGetLanguage() + const locale = localeFromProps || defaultLocale const { type, name, org, label, brief, icon, verified } = payload