UI: "Contract in Progress" window can no longer get lost (#716)

This commit is contained in:
myCatsName 2023-08-05 21:48:00 -06:00 committed by GitHub
parent 6b7cab6ac4
commit 9e55d00b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,6 +24,12 @@ export function CodingContractModal(): React.ReactElement {
useEffect(() => {
CodingContractEvent.subscribe((props) => setContract(props));
});
useEffect(() => {
return () => {
contract?.onClose();
};
}, [contract]);
if (contract === null) return <></>;
function onChange(event: React.ChangeEvent<HTMLInputElement>): void {