From 9452604232b0835d7226020a38cef1ba497e24ad Mon Sep 17 00:00:00 2001 From: janrembold Date: Fri, 19 Apr 2024 16:11:46 +0200 Subject: [PATCH] fix: remove next click listener --- .../agencySelection/AgencySelectionResults.tsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx b/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx index 6c0a623b2..b4a925b70 100644 --- a/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx +++ b/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx @@ -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