diff --git a/src/script/components/Modals/PrimaryModal/PrimaryModalShell/PrimaryModalShell.tsx b/src/script/components/Modals/PrimaryModal/PrimaryModalShell/PrimaryModalShell.tsx index 32021c1c08e..777b370ff91 100644 --- a/src/script/components/Modals/PrimaryModal/PrimaryModalShell/PrimaryModalShell.tsx +++ b/src/script/components/Modals/PrimaryModal/PrimaryModalShell/PrimaryModalShell.tsx @@ -17,7 +17,7 @@ * */ -import {useRef, useEffect, ReactNode} from 'react'; +import {ReactNode} from 'react'; import {ModalComponent} from 'Components/ModalComponent'; @@ -38,14 +38,6 @@ export const PrimaryModalShell = ({ onClose, onBgClick, }: PrimaryModalShellProps) => { - const modalRef = useRef(null); - - useEffect(() => { - if (isShown) { - modalRef.current?.focus(); - } - }, [isShown]); - return (
isShown && ref?.focus()} > {isShown && children}