File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,6 @@ export async function loader() {
2525
2626export function IncidentStatusPanel ( { isCollapsed = false } : { isCollapsed ?: boolean } ) {
2727 const { isManagedCloud } = useFeatures ( ) ;
28- if ( ! isManagedCloud ) {
29- return null ;
30- }
31-
3228 const fetcher = useFetcher < typeof loader > ( ) ;
3329
3430 const fetchIncidents = useCallback ( ( ) => {
@@ -38,16 +34,18 @@ export function IncidentStatusPanel({ isCollapsed = false }: { isCollapsed?: boo
3834 } , [ fetcher ] ) ;
3935
4036 useEffect ( ( ) => {
37+ if ( ! isManagedCloud ) return ;
38+
4139 fetchIncidents ( ) ;
4240
4341 const interval = setInterval ( fetchIncidents , 60 * 1000 ) ; // 1 minute
4442
4543 return ( ) => clearInterval ( interval ) ;
46- } , [ ] ) ;
44+ } , [ isManagedCloud , fetchIncidents ] ) ;
4745
4846 const operational = fetcher . data ?. operational ?? true ;
4947
50- if ( operational ) {
48+ if ( ! isManagedCloud || operational ) {
5149 return null ;
5250 }
5351
You can’t perform that action at this time.
0 commit comments