This commit is contained in:
2025-07-03 09:48:54 +02:00
parent 80cb726501
commit 93c7815d96
12 changed files with 43101 additions and 30 deletions
+5 -5
View File
@@ -9,11 +9,7 @@ import {
} from './constants';
import { WASMDataF, WASMDataPax } from './types/WASMData';
interface IAppProps {
commBus: ViewListener.ViewListener;
}
const App: FC<IAppProps> = ({ commBus }) => {
const App: FC = () => {
const [SBUsername, setSBUsername] = useState<string>();
const [WASMData, setWASMData] = useState<WASMDataPax | WASMDataF>();
const [isReady, setIsReady] = useState(false);
@@ -29,6 +25,8 @@ const App: FC<IAppProps> = ({ commBus }) => {
useEffect(() => {
console.log('Initializing CommBus');
const commBus = RegisterViewListener('JS_LISTENER_COMM_BUS');
commBus.on(TFDI_SIMBRIEF_USERNAME_EVENT, usernameCallback);
commBus.on(COMM_BUS_LIVE_DATA_EVENT, wasmCallback);
@@ -39,6 +37,8 @@ const App: FC<IAppProps> = ({ commBus }) => {
return () => {
commBus.off(TFDI_SIMBRIEF_USERNAME_EVENT, usernameCallback);
commBus.off(COMM_BUS_LIVE_DATA_EVENT, wasmCallback);
commBus.unregister();
};
}, []);