Commit fab29f3e authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

remove umi/locale in components

parent a09ed8c3
...@@ -109,6 +109,10 @@ export default class GlobalHeaderRight extends PureComponent { ...@@ -109,6 +109,10 @@ export default class GlobalHeaderRight extends PureComponent {
onItemClick={(item, tabProps) => { onItemClick={(item, tabProps) => {
console.log(item, tabProps); // eslint-disable-line console.log(item, tabProps); // eslint-disable-line
}} }}
locale={{
emptyText: formatMessage({ id: 'component.noticeIcon.empty' }),
clear: formatMessage({ id: 'component.noticeIcon.clear' }),
}}
onClear={onNoticeClear} onClear={onNoticeClear}
onPopupVisibleChange={onNoticeVisibleChange} onPopupVisibleChange={onNoticeVisibleChange}
loading={fetchingNotices} loading={fetchingNotices}
......
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { formatMessage } from 'umi/locale';
import { Popover, Icon, Tabs, Badge, Spin } from 'antd'; import { Popover, Icon, Tabs, Badge, Spin } from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import List from './NoticeList'; import List from './NoticeList';
...@@ -17,8 +16,8 @@ export default class NoticeIcon extends PureComponent { ...@@ -17,8 +16,8 @@ export default class NoticeIcon extends PureComponent {
onClear: () => {}, onClear: () => {},
loading: false, loading: false,
locale: { locale: {
emptyText: formatMessage({ id: 'component.noticeIcon.empty' }), emptyText: 'No notifications',
clear: formatMessage({ id: 'component.noticeIcon.clear' }), clear: 'Clear',
}, },
emptyImage: 'https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg', emptyImage: 'https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg',
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment