diff --git a/src/components/auth/Auth.tsx b/src/components/auth/Auth.tsx index 3e7898371..6a71dc428 100644 --- a/src/components/auth/Auth.tsx +++ b/src/components/auth/Auth.tsx @@ -6,6 +6,7 @@ import { GlobalActions, GlobalState } from '../../global/types'; import '../../modules/actions/initial'; import { pick } from '../../util/iteratees'; import { PLATFORM_ENV } from '../../util/environment'; +import windowSize from '../../util/windowSize'; import useHistoryBack from '../../hooks/useHistoryBack'; import UiLoader from '../common/UiLoader'; @@ -43,6 +44,15 @@ const Auth: FC = ({ || (isMobile && authState === 'authorizationStateWaitQrCode'), handleChangeAuthorizationMethod, ); + // Prevent refresh when rotating device + useEffect(() => { + windowSize.disableRefresh(); + + return () => { + windowSize.enableRefresh(); + }; + }, []); + switch (authState) { case 'authorizationStateWaitCode': return ;