|
|
@ -11,7 +11,7 @@ import icon_3_u from './assets/tabIcon/icon_tab3_u.svg'; |
|
|
|
import icon_4_s from './assets/tabIcon/icon_tab4_s.svg'; |
|
|
|
import icon_4_u from './assets/tabIcon/icon_tab4_u.svg'; |
|
|
|
import { appWebview, bridgeOb, emitBridgeEvent, registerBridgeFunc } from './utils/bridge'; |
|
|
|
import { useAppDispatch } from './utils/hooks'; |
|
|
|
import { useAppDispatch, useAppSelector } from './utils/hooks'; |
|
|
|
import { addNewPoint, updateTaskState } from './store/features/measureSlice'; |
|
|
|
import { updateBleList, updateDevice, updateSyncProgress } from './store/features/contextSlice'; |
|
|
|
import { createWebSocket, sharedWsUrl } from './services/socket'; |
|
|
@ -69,7 +69,10 @@ const BottomBar = () => { |
|
|
|
|
|
|
|
function App() { |
|
|
|
const dispatch = useAppDispatch(); |
|
|
|
const baseState = useAppSelector((state) => state.baseData); |
|
|
|
if (baseState.railTypes.length === 0) { |
|
|
|
dispatch(fetchRailTypes()); |
|
|
|
} |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
const subscription = bridgeOb.subscribe((datagram) => { |
|
|
|