mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
few fixes in the purchase server popup
This commit is contained in:
parent
bc33f67409
commit
99e82cd867
@ -26,18 +26,12 @@
|
||||
removePopup(props.popupId);
|
||||
}
|
||||
|
||||
function cancel(): void {
|
||||
removePopup(props.popupId);
|
||||
}
|
||||
|
||||
function onKeyUp(event: React.KeyboardEvent<HTMLInputElement>): void {
|
||||
if (event.keyCode === 13) tryToPurchaseServer();
|
||||
if (event.keyCode === 27) cancel();
|
||||
}
|
||||
|
||||
function onChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setHostname(event.target.value);
|
||||
props.rerender();
|
||||
}
|
||||
|
||||
return (
|
||||
@ -57,13 +51,8 @@
|
||||
type="text"
|
||||
placeholder="Unique Hostname"
|
||||
/>
|
||||
<StdButton
|
||||
onClick={tryToPurchaseServer}
|
||||
text="Purchase Server"
|
||||
disabled={!props.p.canAfford(props.cost)}
|
||||
/>
|
||||
<StdButton onClick={tryToPurchaseServer} text="Purchase Server" disabled={!props.p.canAfford(props.cost)} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user