fix contract

This commit is contained in:
Olivier Gagnon
2021-09-09 12:52:43 -04:00
parent b7e07bc7f2
commit 3df298e91e
8 changed files with 71 additions and 45 deletions
+2 -2
View File
@@ -9,12 +9,12 @@ interface IProps<T> {
content: (props: T) => React.ReactElement;
id: string;
props: T;
removePopup: (id: string) => void;
removePopup: () => void;
}
export function Popup<T>(props: IProps<T>): React.ReactElement {
function keyDown(event: KeyboardEvent): void {
if (event.key === "Escape") props.removePopup(props.id);
if (event.key === "Escape") props.removePopup();
}
useEffect(() => {