From cf79ac9eceb6d0d906436debda6897866e2c13d1 Mon Sep 17 00:00:00 2001 From: tristanliu Date: Mon, 2 Dec 2024 14:20:36 +0800 Subject: [PATCH] [fix][chat-sdk] fix build warning --- .../src/components/ChatMsg/Table/index.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/webapp/packages/chat-sdk/src/components/ChatMsg/Table/index.tsx b/webapp/packages/chat-sdk/src/components/ChatMsg/Table/index.tsx index 22ae04df5..76cada80c 100644 --- a/webapp/packages/chat-sdk/src/components/ChatMsg/Table/index.tsx +++ b/webapp/packages/chat-sdk/src/components/ChatMsg/Table/index.tsx @@ -1,8 +1,4 @@ -import { - formatByDecimalPlaces, - getFormattedValue, - formatByThousandSeperator, -} from '../../../utils/utils'; +import { formatByDecimalPlaces, formatByThousandSeperator } from '../../../utils/utils'; import { Table as AntTable } from 'antd'; import { MsgDataType } from '../../../common/type'; import { CLS_PREFIX } from '../../../common/constants'; @@ -13,7 +9,7 @@ import moment from 'moment'; type Props = { data: MsgDataType; size?: SizeType; - question: string; + question?: string; loading?: boolean; onApplyAuth?: (model: string) => void; }; @@ -86,9 +82,12 @@ const Table: React.FC = ({ data, size, loading, question, onApplyAuth }) : queryResults; return (
-
-
{question}
-
+ {question && ( +
+
{question}
+
+ )} +