Initial GSX Sync for fuel
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { LoadingState } from '../../types/general';
|
||||
import { GSXLoadingState, WASMDataPax } from '../../types/WASMData';
|
||||
import { GSXFuelingState, GSXLoadingState, WASMDataPax } from '../../types/WASMData';
|
||||
import OptionsPax from '../options/OptionsPax';
|
||||
import Profile from '../profile/Profile';
|
||||
import SBEntryPax from '../SBEntry/SBEntryPax';
|
||||
@@ -65,6 +65,9 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
||||
WASMData.GSX.loadingState !== GSXLoadingState.DEBOARDED
|
||||
);
|
||||
};
|
||||
const GSXFuelActive = () => {
|
||||
return WASMData.GSX.couatlStarted && WASMData.GSX.fuelingState !== GSXFuelingState.IDLE;
|
||||
};
|
||||
|
||||
const CGs = (): [string, boolean, string, boolean] => {
|
||||
if (loadingState !== 'loaded' && !GSXActive()) {
|
||||
@@ -134,6 +137,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
||||
loadingState={loadingState}
|
||||
setLoadingState={setLoadingState}
|
||||
gsxActive={GSXActive()}
|
||||
gsxFuelActive={GSXFuelActive()}
|
||||
/>
|
||||
)}
|
||||
{((username && selectedTab === 1) || (!username && selectedTab === 0)) && (
|
||||
@@ -142,6 +146,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
||||
loadingState={loadingState}
|
||||
setLoadingState={setLoadingState}
|
||||
gsxActive={GSXActive()}
|
||||
gsxFuelActive={GSXFuelActive()}
|
||||
/>
|
||||
)}
|
||||
{((username && selectedTab === 2) || (!username && selectedTab === 1)) && (
|
||||
@@ -150,6 +155,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
||||
loadingState={loadingState}
|
||||
setLoadingState={setLoadingState}
|
||||
gsxActive={GSXActive()}
|
||||
gsxFuelActive={GSXFuelActive()}
|
||||
/>
|
||||
)}
|
||||
{((username && selectedTab === 3) || (!username && selectedTab === 2)) && (
|
||||
|
||||
Reference in New Issue
Block a user