|
|
|
@ -1794,7 +1794,7 @@
|
|
|
|
/* Band Conditions Grid View */
|
|
|
|
/* Band Conditions Grid View */
|
|
|
|
<div style={{ padding: '4px' }}>
|
|
|
|
<div style={{ padding: '4px' }}>
|
|
|
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '4px' }}>
|
|
|
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '4px' }}>
|
|
|
|
{(bandConditions?.data || []).slice(0, 12).map((band, idx) => {
|
|
|
|
{(bandConditions?.data || []).slice(0, 13).map((band, idx) => {
|
|
|
|
const style = getBandStyle(band.condition);
|
|
|
|
const style = getBandStyle(band.condition);
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div key={idx} style={{
|
|
|
|
<div key={idx} style={{
|
|
|
|
@ -1891,12 +1891,19 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/* 24 hour cells */}
|
|
|
|
{/* 24 hour cells */}
|
|
|
|
{Array.from({ length: 24 }, (_, hour) => {
|
|
|
|
{Array.from({ length: 24 }, (_, hour) => {
|
|
|
|
// For current hour, use currentBands (same hybrid data as bars view)
|
|
|
|
// For current hour, try to use currentBands (same hybrid data as bars view)
|
|
|
|
// For other hours, use hourlyPredictions
|
|
|
|
// Fall back to hourlyPredictions if currentBands doesn't have this band
|
|
|
|
let rel;
|
|
|
|
let rel = 0;
|
|
|
|
if (hour === currentHour) {
|
|
|
|
if (hour === currentHour && currentBands?.length > 0) {
|
|
|
|
const currentBandData = currentBands.find(b => b.band === band);
|
|
|
|
const currentBandData = currentBands.find(b => b.band === band);
|
|
|
|
rel = currentBandData?.reliability || 0;
|
|
|
|
if (currentBandData) {
|
|
|
|
|
|
|
|
rel = currentBandData.reliability || 0;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// Band not in currentBands, use hourlyPredictions
|
|
|
|
|
|
|
|
const bandData = hourlyPredictions?.[band];
|
|
|
|
|
|
|
|
const hourData = bandData?.find(h => h.hour === hour);
|
|
|
|
|
|
|
|
rel = hourData?.reliability || 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
const bandData = hourlyPredictions?.[band];
|
|
|
|
const bandData = hourlyPredictions?.[band];
|
|
|
|
const hourData = bandData?.find(h => h.hour === hour);
|
|
|
|
const hourData = bandData?.find(h => h.hour === hour);
|
|
|
|
@ -1976,7 +1983,7 @@
|
|
|
|
<span><span style={{ color: 'var(--text-muted)' }}>K </span><span style={{ color: solarData.kIndex >= 4 ? '#ff4444' : '#00ff88' }}>{solarData.kIndex}</span></span>
|
|
|
|
<span><span style={{ color: 'var(--text-muted)' }}>K </span><span style={{ color: solarData.kIndex >= 4 ? '#ff4444' : '#00ff88' }}>{solarData.kIndex}</span></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{currentBands.slice(0, 8).map((band, idx) => (
|
|
|
|
{(currentBands || []).slice(0, 11).map((band, idx) => (
|
|
|
|
<div key={band.band} style={{
|
|
|
|
<div key={band.band} style={{
|
|
|
|
display: 'grid',
|
|
|
|
display: 'grid',
|
|
|
|
gridTemplateColumns: '32px 1fr 40px',
|
|
|
|
gridTemplateColumns: '32px 1fr 40px',
|
|
|
|
|