From 9e22b3044d39cacffbeb4943a4aef5e70737d726 Mon Sep 17 00:00:00 2001 From: Sever Abibula <5903809+SeverS@users.noreply.github.com> Date: Wed, 15 Dec 2021 14:03:20 +0200 Subject: [PATCH] Fix image popovers (#1519) * fix(): avatar and cover image popovers * chore(): add redirect from topbar sign-in --- apps/auth-app/src/components/sign-in/index.tsx | 5 +++-- ui/design/src/components/ImagePopover/form-image-popover.tsx | 1 + ui/widgets/top-bar/src/components/topbar-component.tsx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/auth-app/src/components/sign-in/index.tsx b/apps/auth-app/src/components/sign-in/index.tsx index b7c091d181..cd6360eebb 100644 --- a/apps/auth-app/src/components/sign-in/index.tsx +++ b/apps/auth-app/src/components/sign-in/index.tsx @@ -47,6 +47,8 @@ const SignIn: React.FC = props => { const { signUpState, ethAddress, fireRemainingMessages, error, fullSignUp, resetState } = useSignUp(selectedProvider, true); + const signupStateReset = React.useRef(resetState); + const isNotRegistered = React.useMemo( () => error && error.message.toLowerCase().trim() === 'profile not found', [error], @@ -60,7 +62,6 @@ const SignIn: React.FC = props => { React.useEffect(() => { if (signInComplete && profileDataReq.isSuccess && !!profileDataReq.data?.userName) { - resetState(); return navigateTo.current((qsStringify, currentRedirect) => { if (!currentRedirect) { return '/'; @@ -149,7 +150,7 @@ const SignIn: React.FC = props => { {networkNotSupported && ( = props => { align={{ top: 'bottom', left: 'left' }} onClickOutside={closePopover} onEsc={closePopover} + style={{ zIndex: 999 }} > { pathName: appRoutes => { return appRoutes[appRoutes.SIGN_IN]; }, + queryStrings: qsStringify => qsStringify({ redirectTo: location.pathname }), }); };