mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
chore: Fix LocaleReceiver ts define
This commit is contained in:
parent
5a3bceea28
commit
40473cfa19
@ -61,8 +61,9 @@ export function useLocaleReceiver<T extends LocaleComponent>(
|
||||
const componentLocale = React.useMemo(() => {
|
||||
const locale = defaultLocale || defaultLocaleData[componentName || 'global'];
|
||||
const localeFromContext = componentName && antLocale ? antLocale[componentName] : {};
|
||||
|
||||
return {
|
||||
...(typeof locale === 'function' ? locale() : locale),
|
||||
...(typeof locale === 'function' ? (locale as Function)() : locale),
|
||||
...(localeFromContext || {}),
|
||||
};
|
||||
}, [componentName, defaultLocale, antLocale]);
|
||||
|
Loading…
Reference in New Issue
Block a user