[fix][chat-sdk] fix build warning

This commit is contained in:
tristanliu
2024-12-02 14:20:36 +08:00
parent 02f0063846
commit cf79ac9ece

View File

@@ -1,8 +1,4 @@
import { import { formatByDecimalPlaces, formatByThousandSeperator } from '../../../utils/utils';
formatByDecimalPlaces,
getFormattedValue,
formatByThousandSeperator,
} from '../../../utils/utils';
import { Table as AntTable } from 'antd'; import { Table as AntTable } from 'antd';
import { MsgDataType } from '../../../common/type'; import { MsgDataType } from '../../../common/type';
import { CLS_PREFIX } from '../../../common/constants'; import { CLS_PREFIX } from '../../../common/constants';
@@ -13,7 +9,7 @@ import moment from 'moment';
type Props = { type Props = {
data: MsgDataType; data: MsgDataType;
size?: SizeType; size?: SizeType;
question: string; question?: string;
loading?: boolean; loading?: boolean;
onApplyAuth?: (model: string) => void; onApplyAuth?: (model: string) => void;
}; };
@@ -86,9 +82,12 @@ const Table: React.FC<Props> = ({ data, size, loading, question, onApplyAuth })
: queryResults; : queryResults;
return ( return (
<div className={prefixCls}> <div className={prefixCls}>
<div className={`${prefixCls}-top-bar`}> {question && (
<div className={`${prefixCls}-indicator-name`}>{question}</div> <div className={`${prefixCls}-top-bar`}>
</div> <div className={`${prefixCls}-indicator-name`}>{question}</div>
</div>
)}
<AntTable <AntTable
pagination={ pagination={
queryResults.length <= 10 ? false : { defaultPageSize: 10, position: ['bottomCenter'] } queryResults.length <= 10 ? false : { defaultPageSize: 10, position: ['bottomCenter'] }