mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-10-23 10:13:13 +02:00
26 lines
706 B
TypeScript
26 lines
706 B
TypeScript
import React from "react";
|
|
import { GeneralActionElem } from "./GeneralActionElem";
|
|
import { Action } from "../Action";
|
|
import { GeneralActions } from "../GeneralActions";
|
|
import { IBladeburner } from "../IBladeburner";
|
|
|
|
interface IProps {
|
|
bladeburner: IBladeburner;
|
|
}
|
|
|
|
export function GeneralActionList(props: IProps): React.ReactElement {
|
|
const actions: Action[] = [];
|
|
for (const name of Object.keys(GeneralActions)) {
|
|
if (GeneralActions.hasOwnProperty(name)) {
|
|
actions.push(GeneralActions[name]);
|
|
}
|
|
}
|
|
return (
|
|
<>
|
|
{actions.map((action: Action) => (
|
|
<GeneralActionElem key={action.name} bladeburner={props.bladeburner} action={action} />
|
|
))}
|
|
</>
|
|
);
|
|
}
|