Files
bitburner-src/src/Bladeburner/ui/TravelPopup.tsx
Olivier Gagnon 1a1a43c1ce v0.52.4
2021-08-19 01:45:26 -04:00

32 lines
1.1 KiB
TypeScript

import React from "react";
import { removePopup } from "../../ui/React/createPopup";
import { BladeburnerConstants } from "../data/Constants";
import { IBladeburner } from "../IBladeburner";
interface IProps {
bladeburner: IBladeburner;
popupId: string;
}
export function TravelPopup(props: IProps): React.ReactElement {
function travel(city: string): void {
props.bladeburner.city = city;
removePopup(props.popupId);
}
return (<>
<p>
Travel to a different city for your Bladeburner
activities. This does not cost any money. The city you are
in for your Bladeburner duties does not affect
your location in the game otherwise.
</p>
{BladeburnerConstants.CityNames.map(city => {
// Reusing this css class...it adds a border and makes it
// so that background color changes when you hover
return <div key={city} className="cmpy-mgmt-find-employee-option"
onClick={() => travel(city)}>
{city}
</div>})}
</>);
}