mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-20 13:44:19 +08:00
(improvement)(chat-sdk) optimize tip and card title (#1652)
This commit is contained in:
@@ -10,11 +10,12 @@ import { useState } from 'react';
|
||||
|
||||
type Props = {
|
||||
data: MsgDataType;
|
||||
question: string;
|
||||
loading: boolean;
|
||||
onApplyAuth?: (model: string) => void;
|
||||
};
|
||||
|
||||
const MetricCard: React.FC<Props> = ({ data, loading, onApplyAuth }) => {
|
||||
const MetricCard: React.FC<Props> = ({ data, question, loading, onApplyAuth }) => {
|
||||
const { queryMode, queryColumns, queryResults, entityInfo, aggregateInfo } = data;
|
||||
|
||||
const { metricInfos } = aggregateInfo || {};
|
||||
@@ -39,11 +40,7 @@ const MetricCard: React.FC<Props> = ({ data, loading, onApplyAuth }) => {
|
||||
return (
|
||||
<div className={matricCardClass}>
|
||||
<div className={`${prefixCls}-top-bar`}>
|
||||
{indicatorColumn?.name ? (
|
||||
<div className={`${prefixCls}-indicator-name`}>{indicatorColumn?.name}</div>
|
||||
) : (
|
||||
<div style={{ height: 10 }} />
|
||||
)}
|
||||
<div className={`${prefixCls}-indicator-name`}>{question}</div>
|
||||
</div>
|
||||
<Spin spinning={loading}>
|
||||
<div className={`${prefixCls}-indicator`}>
|
||||
|
||||
Reference in New Issue
Block a user