Explorar el Código

fix: show no data message when there is no area data either

Jose Diaz-Gonzalez hace 2 años
padre
commit
cfae805c06

+ 1 - 1
dashboard/src/main/home/app-dashboard/expanded-app/metrics/MetricsChart.tsx

@@ -339,7 +339,7 @@ const MetricsChart: React.FunctionComponent<PropsType> = ({
                 </Flex>
             </MetricsHeader>
             {isLoading > 0 && <Loading />}
-            {data.length === 0 && isLoading === 0 && (
+            {(data.length === 0 && Object.keys(areaData).length === 0) && isLoading === 0 && (
                 <Message>
                     No data available yet.
                     <Highlight color={"#8590ff"} onClick={getMetrics}>