Skip to content

Commit

Permalink
#106 Lint AnnotationsOverlay.js
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Dec 30, 2020
1 parent e368467 commit 9fdd4ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/AnnotationsOverlay/AnnotationsOverlay.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useContext, useEffect } from 'react';
import $ from 'jquery';
import {
Popover,
Overlay,
Expand All @@ -15,8 +14,12 @@ export default function AnnotationsOverlay() {
setActiveAnnotations({ annotations: [], target: null });
}
};
// adding a click event listener to document so if the document is clicked we can check if where it was click there is an annotation and if not then we hide the Overlay
// adding a click event listener to document so if
// the document is clicked we can check if where it
// was click there is an annotation and if not then we hide the Overlay
// eslint-disable-next-line no-undef
document.addEventListener('click', handleDocumentClick);
// eslint-disable-next-line no-undef
return () => document.removeEventListener('click', handleDocumentClick);
});
return (
Expand Down

0 comments on commit 9fdd4ea

Please sign in to comment.