Freighter
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import Freighter from './components/freighter/Freighter';
|
||||
import Pax from './components/pax/Pax';
|
||||
import {
|
||||
COHERENT_COMM_BUS_WASM_CALL,
|
||||
@@ -6,7 +7,7 @@ import {
|
||||
TFDI_SIMBRIEF_USERNAME_CALL,
|
||||
TFDI_SIMBRIEF_USERNAME_EVENT,
|
||||
} from './constants';
|
||||
import { WASMDataPax } from './types/WASMData';
|
||||
import { WASMDataF, WASMDataPax } from './types/WASMData';
|
||||
|
||||
interface IAppProps {
|
||||
commBus: ViewListener.ViewListener;
|
||||
@@ -14,7 +15,7 @@ interface IAppProps {
|
||||
|
||||
const App: FC<IAppProps> = ({ commBus }) => {
|
||||
const [SBUsername, setSBUsername] = useState<string>();
|
||||
const [WASMData, setWASMData] = useState<WASMDataPax>();
|
||||
const [WASMData, setWASMData] = useState<WASMDataPax | WASMDataF>();
|
||||
const [isReady, setIsReady] = useState(false);
|
||||
|
||||
// CommBus
|
||||
@@ -46,9 +47,9 @@ const App: FC<IAppProps> = ({ commBus }) => {
|
||||
<div className="flex w-3/4 flex-col items-center">
|
||||
{isReady && WASMData ? (
|
||||
WASMData.userData.isCargo ? (
|
||||
<>Not yet Implemented</>
|
||||
<Freighter WASMData={WASMData as WASMDataF} username={SBUsername} />
|
||||
) : (
|
||||
<Pax WASMData={WASMData} username={SBUsername} />
|
||||
<Pax WASMData={WASMData as WASMDataPax} username={SBUsername} />
|
||||
)
|
||||
) : (
|
||||
<h1 className="text-sm font-medium">LOADING</h1>
|
||||
|
||||
Reference in New Issue
Block a user