|
|
@ -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]); |
|
|
|