2021-09-27 23:09:48 +02:00
|
|
|
import React from "react";
|
2021-08-10 17:25:21 +02:00
|
|
|
import { GeneralActionPage } from "./GeneralActionPage";
|
|
|
|
import { ContractPage } from "./ContractPage";
|
|
|
|
import { OperationPage } from "./OperationPage";
|
|
|
|
import { BlackOpPage } from "./BlackOpPage";
|
|
|
|
import { SkillPage } from "./SkillPage";
|
2021-08-16 04:35:43 +02:00
|
|
|
import { IBladeburner } from "../IBladeburner";
|
2021-08-16 07:35:05 +02:00
|
|
|
import { IPlayer } from "../../PersonObjects/IPlayer";
|
2021-08-10 17:25:21 +02:00
|
|
|
|
2021-09-27 23:09:48 +02:00
|
|
|
import Tabs from "@mui/material/Tabs";
|
|
|
|
import Tab from "@mui/material/Tab";
|
|
|
|
import Box from "@mui/material/Box";
|
|
|
|
|
2021-08-10 17:25:21 +02:00
|
|
|
interface IProps {
|
2021-09-05 01:09:30 +02:00
|
|
|
bladeburner: IBladeburner;
|
|
|
|
player: IPlayer;
|
2021-08-10 17:25:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export function AllPages(props: IProps): React.ReactElement {
|
2021-09-27 23:09:48 +02:00
|
|
|
const [value, setValue] = React.useState(0);
|
2021-08-10 17:25:21 +02:00
|
|
|
|
2021-09-27 23:09:48 +02:00
|
|
|
function handleChange(event: React.SyntheticEvent, tab: number): void {
|
|
|
|
setValue(tab);
|
2021-09-05 01:09:30 +02:00
|
|
|
}
|
2021-09-27 23:09:48 +02:00
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
return (
|
|
|
|
<>
|
2021-09-29 01:38:51 +02:00
|
|
|
<Tabs variant="fullWidth" value={value} onChange={handleChange}>
|
2021-09-27 23:09:48 +02:00
|
|
|
<Tab label="General" />
|
|
|
|
<Tab label="Contracts" />
|
|
|
|
<Tab label="Operations" />
|
|
|
|
<Tab label="BlackOps" />
|
|
|
|
<Tab label="Skills" />
|
|
|
|
</Tabs>
|
|
|
|
<Box sx={{ p: 1 }}>
|
|
|
|
{value === 0 && <GeneralActionPage bladeburner={props.bladeburner} player={props.player} />}
|
|
|
|
{value === 1 && <ContractPage bladeburner={props.bladeburner} player={props.player} />}
|
|
|
|
{value === 2 && <OperationPage bladeburner={props.bladeburner} player={props.player} />}
|
|
|
|
{value === 3 && <BlackOpPage bladeburner={props.bladeburner} player={props.player} />}
|
|
|
|
{value === 4 && <SkillPage bladeburner={props.bladeburner} />}
|
|
|
|
</Box>
|
2021-09-05 01:09:30 +02:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|