Commit 3f9923bd authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix(Analysis): fix total consumption card display

parent 5900e3b5
......@@ -134,18 +134,14 @@ const MonthlyAnalysis: React.FC<MonthlyAnalysisProps> = ({
})}
</div>
</div>
{fluidTypes.length <= 1 ? (
<></>
) : (
<div className="analysis-content">
<div className="card rich-card">
<TotalAnalysisChart
analysisDate={analysisDate}
fluidTypes={fluidTypes}
/>
</div>
<div className="analysis-content">
<div className="card rich-card">
<TotalAnalysisChart
analysisDate={analysisDate}
fluidTypes={fluidTypes}
/>
</div>
)}
</div>
<div className="analysis-content">
<div className="card rich-card">
<MaxConsumptionCard analysisDate={analysisDate} />
......
......@@ -66,9 +66,7 @@ const TotalAnalysisChart: React.FC<TotalAnalysisChartProps> = ({
minHeight: radius + 100,
}}
>
{fluidTypes.length >= 2 && (
<div className="text-24-normal title">{t('analysis_pie.total')}</div>
)}
<div className="text-24-normal title">{t('analysis_pie.total')}</div>
{dataLoadArray && (
<PieChart
dataArray={dataLoadArray}
......@@ -82,7 +80,7 @@ const TotalAnalysisChart: React.FC<TotalAnalysisChartProps> = ({
.startOf('month')}
/>
)}
{dataLoadArray && (
{dataLoadArray && fluidTypes.length > 1 && (
<div className="total-card-container">
{dataLoadArray.map((load, index) => {
return (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment