mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
fix contract
This commit is contained in:
@@ -3,7 +3,6 @@ import { KEY } from "../../../utils/helpers/keyCodes";
|
||||
|
||||
import { CodingContract, CodingContractType, CodingContractTypes } from "../../CodingContracts";
|
||||
import { ClickableTag, CopyableText } from "./CopyableText";
|
||||
import { PopupCloseButton } from "./PopupCloseButton";
|
||||
|
||||
type IProps = {
|
||||
c: CodingContract;
|
||||
@@ -28,9 +27,6 @@ export function CodingContractPopup(props: IProps): React.ReactElement {
|
||||
if (event.keyCode === KEY.ENTER && value !== "") {
|
||||
event.preventDefault();
|
||||
props.onAttempt(answer);
|
||||
} else if (event.keyCode === KEY.ESC) {
|
||||
event.preventDefault();
|
||||
props.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +55,9 @@ export function CodingContractPopup(props: IProps): React.ReactElement {
|
||||
onChange={onChange}
|
||||
onKeyDown={onKeyDown}
|
||||
/>
|
||||
<PopupCloseButton popup={props.popupId} onClose={() => props.onAttempt(answer)} text={"Solve"} />
|
||||
<PopupCloseButton popup={props.popupId} onClose={props.onClose} text={"Close"} />
|
||||
<button className={"std-button"} onClick={() => props.onAttempt(answer)}>
|
||||
Solve
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user