small components update
This commit is contained in:
parent
e47951fb7e
commit
37abbde5a1
@ -140,7 +140,7 @@ const EnergyLineChart = ({ siteId }: EnergyLineChartProps) => {
|
|||||||
setGeneration(res.generation);
|
setGeneration(res.generation);
|
||||||
|
|
||||||
// ⬇️ ADD THIS here — fetch forecast
|
// ⬇️ ADD THIS here — fetch forecast
|
||||||
const forecastData = await fetchForecast(3.15, 101.7, 37, 0, 5.67);
|
const forecastData = await fetchForecast(3.15, 101.7, 37, 0, 20.67);
|
||||||
const selectedDateStr = selectedDate.toISOString().split('T')[0];
|
const selectedDateStr = selectedDate.toISOString().split('T')[0];
|
||||||
|
|
||||||
setForecast(
|
setForecast(
|
||||||
|
@ -127,10 +127,7 @@ const generationColor = isDark ? '#fcd913' : '#669bbc';
|
|||||||
if (loading || !siteId || chartData.length === 0) {
|
if (loading || !siteId || chartData.length === 0) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-white p-3 rounded-lg shadow-md dark:bg-rtgray-800 dark:text-white-light">
|
<div className="bg-white p-3 rounded-lg shadow-md dark:bg-rtgray-800 dark:text-white-light">
|
||||||
<div className="flex justify-between items-center mb-2">
|
<div className="h-[200px] w-full flex items-center justify-center">
|
||||||
<h2 className="text-lg font-bold">Monthly Energy Yield</h2>
|
|
||||||
</div>
|
|
||||||
<div className="h-96 w-full flex items-center justify-center">
|
|
||||||
<p className="text-white/70">
|
<p className="text-white/70">
|
||||||
{loading ? 'Loading data...' : 'No data available for chart.'}
|
{loading ? 'Loading data...' : 'No data available for chart.'}
|
||||||
</p>
|
</p>
|
||||||
|
@ -37,7 +37,7 @@ export default function KpiBottom({
|
|||||||
</div>
|
</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
||||||
<Panel title="Monthly Yield">
|
<Panel title="Yield Bar Chart">
|
||||||
<div className="w-full h-48">
|
<div className="w-full h-48">
|
||||||
{middle}
|
{middle}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user