mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
UI: "Contract in Progress" window can no longer get lost (#716)
This commit is contained in:
parent
6b7cab6ac4
commit
9e55d00b4f
@ -24,6 +24,12 @@ export function CodingContractModal(): React.ReactElement {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
CodingContractEvent.subscribe((props) => setContract(props));
|
CodingContractEvent.subscribe((props) => setContract(props));
|
||||||
});
|
});
|
||||||
|
useEffect(() => {
|
||||||
|
return () => {
|
||||||
|
contract?.onClose();
|
||||||
|
};
|
||||||
|
}, [contract]);
|
||||||
|
|
||||||
if (contract === null) return <></>;
|
if (contract === null) return <></>;
|
||||||
|
|
||||||
function onChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
function onChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user