mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Merge pull request #2495 from TheMas3212/fix-2163
Clear input field for CodingContractModal after submission
This commit is contained in:
commit
f6bc3b0b5e
@ -40,6 +40,7 @@ export function CodingContractModal(): React.ReactElement {
|
|||||||
if (event.keyCode === KEY.ENTER && value !== "") {
|
if (event.keyCode === KEY.ENTER && value !== "") {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
props.onAttempt(answer);
|
props.onAttempt(answer);
|
||||||
|
setAnswer("");
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -75,6 +76,7 @@ export function CodingContractModal(): React.ReactElement {
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.onAttempt(answer);
|
props.onAttempt(answer);
|
||||||
|
setAnswer("");
|
||||||
close();
|
close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user