refactor: update notfound or nodata component export in plugin

test/ios-bundle
moonrailgun 2 years ago
parent 52675e3195
commit 61aac2c2ff

@ -33,7 +33,6 @@
"k206eff71": "Nickname can not be blank",
"k21ee7a1f": "Roles",
"k226a52c3": "Invite settings modified successfully",
"k22856100": "Not found",
"k22ffe5e9": "Allow to manage users",
"k2317a90c": "Clear Inbox",
"k23a3bd72": "Abnormal",
@ -143,6 +142,7 @@
"k651efa29": "Change friend nickname",
"k65b21404": "Download",
"k6686ad69": "Select group members",
"k6728eaaa": "No Data",
"k67d68dd1": "Type",
"k68022ee7": "All",
"k68283d04": "Application sent",
@ -180,6 +180,7 @@
"k79304fa9": "Nickname changed successfully",
"k795c9a6e": "5 uses",
"k7a89720": "Open in new window",
"k7b662ad7": "Content not found",
"k7c232f9e": "Panel",
"k7cf4e7ff": "Message deleted successfully",
"k7daa1233": "Are you sure you want to mute {{name}}",

@ -33,7 +33,6 @@
"k206eff71": "昵称不能为空",
"k21ee7a1f": "身份组",
"k226a52c3": "邀请设置修改成功",
"k22856100": "未找到",
"k22ffe5e9": "允许管理用户",
"k2317a90c": "清空收件箱",
"k23a3bd72": "异常",
@ -143,6 +142,7 @@
"k651efa29": "更改好友昵称",
"k65b21404": "下载",
"k6686ad69": "选择群组成员",
"k6728eaaa": "没有数据",
"k67d68dd1": "类型",
"k68022ee7": "全部",
"k68283d04": "已发送申请",
@ -180,6 +180,7 @@
"k79304fa9": "修改昵称成功",
"k795c9a6e": "5次使用",
"k7a89720": "在新窗口打开",
"k7b662ad7": "未找到内容",
"k7c232f9e": "面板",
"k7cf4e7ff": "消息删除成功",
"k7daa1233": "确定要禁言 {{name}} 么",

@ -1,5 +1,6 @@
import React from 'react';
import { Empty } from 'antd';
import { t } from 'tailchat-shared';
interface NoDataProps {
message?: string;
@ -9,6 +10,6 @@ interface NoDataProps {
*
*/
export const NoData: React.FC<NoDataProps> = React.memo((props) => {
return <Empty description={props.message} />;
return <Empty description={props.message ?? t('没有数据')} />;
});
NoData.displayName = 'NoData';

@ -10,6 +10,6 @@ interface NotFoundProps {
*
*/
export const NotFound: React.FC<NotFoundProps> = React.memo((props) => {
return <Empty description={props.message ?? t('未找到')} />;
return <Empty description={props.message ?? t('未找到内容')} />;
});
NotFound.displayName = 'NotFound';

@ -75,3 +75,4 @@ export {
JumpToConverseButton,
} from '@/components/JumpToButton';
export { NoData } from '@/components/NoData';
export { NotFound } from '@/components/NotFound';

@ -1,5 +1,5 @@
import { Highlight } from '@/components/Highlight';
import { Button, Divider, Empty, Typography } from 'antd';
import { Button, Divider, Typography } from 'antd';
import {
addFriendRequest,
searchUserWithUniqueName,
@ -14,6 +14,7 @@ import {
import React, { useCallback, useState } from 'react';
import _isNil from 'lodash/isNil';
import { Avatar } from 'tailchat-design';
import { NoData } from '@/components/NoData';
const SearchFriendResult: React.FC<{
result: UserBaseInfo | undefined | null;
@ -34,7 +35,7 @@ const SearchFriendResult: React.FC<{
}
if (result === null) {
return <Empty />;
return <NoData />;
}
const hasSent = hasSentUserId === result._id;

Loading…
Cancel
Save