Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
2hwk committed Apr 6, 2024
1 parent 6a36f3b commit 1222dc7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
/* eslint-disable max-len */
import React from 'react';
import { CargoBar } from '../PayloadElements';
import { CargoStationInfo } from '../Seating/Constants';

interface CargoStationInfo {
name: string,
weight: number,
simVar: string,
stationIndex: number,
progressBarWidth: number,
position: number,
}

interface SeatMapProps {
cargo: number[],
Expand All @@ -22,10 +30,10 @@ enum CargoStation {

export const CargoWidget: React.FC<SeatMapProps> = ({ cargo, cargoDesired, cargoMap, onClickCargo }) => (
<>
<div className="flex absolute top-4 left-1/4 flex-row px-4 w-fit">
<div className="absolute left-1/4 top-4 flex w-fit flex-row px-4">
<CargoBar cargoId={CargoStation.FwdBag} cargo={cargo} cargoDesired={cargoDesired} cargoMap={cargoMap} onClickCargo={onClickCargo} />
</div>
<div className="flex absolute top-4 left-2/3 flex-row px-4 w-fit">
<div className="absolute left-2/3 top-4 flex w-fit flex-row px-4">
<CargoBar cargoId={CargoStation.AftCont} cargo={cargo} cargoDesired={cargoDesired} cargoMap={cargoMap} onClickCargo={onClickCargo} />
<CargoBar cargoId={CargoStation.AftBag} cargo={cargo} cargoDesired={cargoDesired} cargoMap={cargoMap} onClickCargo={onClickCargo} />
<CargoBar cargoId={CargoStation.AftBulk} cargo={cargo} cargoDesired={cargoDesired} cargoMap={cargoMap} onClickCargo={onClickCargo} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@

/* eslint-disable max-len */
import React from 'react';
import { CargoStationInfo } from '../Seating/Constants';
import { CargoBar } from '../PayloadElements';

interface CargoStationInfo {
name: string,
weight: number,
simVar: string,
stationIndex: number,
progressBarWidth: number,
position: number,
}
interface SeatMapProps {
cargo: number[],
cargoDesired: number[],
Expand All @@ -21,10 +28,10 @@ enum CargoStation {

export const CargoWidget: React.FC<SeatMapProps> = ({ cargo, cargoDesired, cargoMap, onClickCargo }) => (
<>
<div className="flex absolute top-4 left-40 flex-row px-4 w-fit">
<div className="absolute left-40 top-4 flex w-fit flex-row px-4">
<CargoBar cargoId={CargoStation.FwdBag} cargo={cargo} cargoDesired={cargoDesired} cargoMap={cargoMap} onClickCargo={onClickCargo} />
</div>
<div className="flex absolute top-4 left-2/3 flex-row px-4 w-fit">
<div className="absolute left-2/3 top-4 flex w-fit flex-row px-4">
<CargoBar cargoId={CargoStation.AftBag} cargo={cargo} cargoDesired={cargoDesired} cargoMap={cargoMap} onClickCargo={onClickCargo} />
<CargoBar cargoId={CargoStation.AftBulk} cargo={cargo} cargoDesired={cargoDesired} cargoMap={cargoMap} onClickCargo={onClickCargo} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* eslint-disable no-console */
import React from 'react';
import { AirframeType } from '@flybywiresim/fbw-sdk';
import { useAppSelector } from 'instruments/src/EFB/Store/store';
import { useAppSelector } from '@flybywiresim/flypad';
import { A380Services } from './A380_842/A380Services';
import { A320Services } from './A320_251N/A320Services';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import React, { useEffect, useState } from 'react';
import { usePersistentNumberProperty, useSimVar } from '@flybywiresim/fbw-sdk';
import { ExclamationCircleFill } from 'react-bootstrap-icons';
import { useAppSelector } from 'instruments/src/EFB/Store/store';
import { useAppSelector } from '@flybywiresim/flypad';
import { t } from '../../Localization/translation';
import { Toggle } from '../../UtilComponents/Form/Toggle';
import { SelectGroup, SelectItem, VerticalSelectGroup } from '../../UtilComponents/Form/Select';
Expand Down

0 comments on commit 1222dc7

Please sign in to comment.