File tree Expand file tree Collapse file tree
web/src/features/panels/zone Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import useGetZone from 'api/getZone';
22import HorizontalDivider from 'components/HorizontalDivider' ;
33import { useEffect , useState } from 'react' ;
44import { FiAlertTriangle } from 'react-icons/fi' ;
5- import { TimeRange } from 'utils/constants' ;
65
76interface ZoneAlert {
87 message : string ;
@@ -15,22 +14,17 @@ interface ZoneDetail {
1514 zoneMessage : ZoneAlert | null ;
1615}
1716
18- export default function CurrentGridAlertsCard ( {
19- datetimes,
20- timeRange,
21- } : {
22- datetimes : Date [ ] ;
23- timeRange : TimeRange ;
24- displayByEmissions : boolean ;
25- } ) {
17+ export default function CurrentGridAlertsCard ( ) {
2618 const [ zoneDetails , setZoneDetails ] = useState < ZoneDetail [ ] > ( [ ] ) ;
2719 const [ loading , setLoading ] = useState ( true ) ;
2820
2921 const { data, isLoading : isZoneLoading } = useGetZone ( ) ;
3022
3123 useEffect ( ( ) => {
3224 async function fetchAlerts ( ) {
33- if ( ! data ) { return ; }
25+ if ( ! data ) {
26+ return ;
27+ }
3428
3529 setLoading ( true ) ;
3630 try {
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ import {
2222
2323import AreaGraphContainer from './AreaGraphContainer' ;
2424import Attribution from './Attribution' ;
25+ import CurrentGridAlertsCard from './CurrentGridAlertsCard' ;
2526import DisplayByEmissionToggle from './DisplayByEmissionToggle' ;
2627import GridAlertsCard from './GridAlertsCard' ;
27- import CurrentGridAlertsCard from './CurrentGridAlertsCard' ;
2828import MethodologyCard from './MethodologyCard' ;
2929import NoInformationMessage from './NoInformationMessage' ;
3030import { getHasSubZones , getZoneDataStatus , ZoneDataStatus } from './util' ;
@@ -81,11 +81,7 @@ export default function ZoneDetails(): JSX.Element {
8181 isError = { isError }
8282 zoneDataStatus = { zoneDataStatus }
8383 >
84- < CurrentGridAlertsCard
85- datetimes = { datetimes }
86- timeRange = { timeRange }
87- displayByEmissions = { displayByEmissions }
88- />
84+ < CurrentGridAlertsCard />
8985 < BarBreakdownChart hasEstimationPill = { hasEstimationOrAggregationPill } />
9086 < ApiButton
9187 backgroundClasses = "mt-3 mb-1"
You can’t perform that action at this time.
0 commit comments