Skip to content

Commit

Permalink
fix: remove next click listener
Browse files Browse the repository at this point in the history
  • Loading branch information
janrembold committed Apr 19, 2024
1 parent fd224c7 commit 9452604
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,6 @@ export const AgencySelectionResults = ({
const isSingleResultAndNotOnlyExternal =
results?.length === 1 && !onlyExternalAgencies;

useEffect(() => {
if (!isSingleResultAndNotOnlyExternal) return;

const handleKeyDown = (event: KeyboardEvent) => {
if (event.key === 'Enter') {
event.preventDefault();
onNextClick();
}
};

document.addEventListener('keydown', handleKeyDown);

return () => {
document.removeEventListener('keydown', handleKeyDown);
};
}, [isSingleResultAndNotOnlyExternal, onNextClick]);

useEffect(() => {
if (
// only external agencies
Expand Down

0 comments on commit 9452604

Please sign in to comment.