11// SPDX-License-Identifier: MIT
2- // Copyright (c) 2020-2023 The Pybricks Authors
2+ // Copyright (c) 2020-2025 The Pybricks Authors
33
44import './status-bar.scss' ;
55import {
@@ -16,8 +16,8 @@ import {
1616import { Disable , Error , TickCircle } from '@blueprintjs/icons' ;
1717import classNames from 'classnames' ;
1818import React , { useMemo } from 'react' ;
19- import { BleConnectionState } from '../ble/reducers' ;
2019import { CompletionEngineStatus } from '../editor/redux/codeCompletion' ;
20+ import { HubRuntimeState } from '../hub/reducers' ;
2121import { useSelector } from '../reducers' ;
2222import { useI18n } from './i18n' ;
2323
@@ -144,7 +144,7 @@ const BatteryIndicator: React.FunctionComponent = () => {
144144} ;
145145
146146const StatusBar : React . FunctionComponent = ( ) => {
147- const connection = useSelector ( ( s ) => s . ble . connection ) ;
147+ const runtime = useSelector ( ( s ) => s . hub . runtime ) ;
148148
149149 return (
150150 < div
@@ -156,7 +156,7 @@ const StatusBar: React.FunctionComponent = () => {
156156 < CompletionEngineIndicator />
157157 </ div >
158158 < div className = "pb-status-bar-group" >
159- { connection === BleConnectionState . Connected && (
159+ { runtime !== HubRuntimeState . Disconnected && (
160160 < >
161161 < HubInfoButton />
162162 < BatteryIndicator />
0 commit comments