Skip to content

Commit

Permalink
Fix image popovers (#1519)
Browse files Browse the repository at this point in the history
* fix(): avatar and cover image popovers

* chore(): add redirect from topbar sign-in
  • Loading branch information
SeverS committed Dec 15, 2021
1 parent 51741ee commit 9e22b30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apps/auth-app/src/components/sign-in/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const SignIn: React.FC<RootComponentProps> = 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],
Expand All @@ -60,7 +62,6 @@ const SignIn: React.FC<RootComponentProps> = props => {

React.useEffect(() => {
if (signInComplete && profileDataReq.isSuccess && !!profileDataReq.data?.userName) {
resetState();
return navigateTo.current((qsStringify, currentRedirect) => {
if (!currentRedirect) {
return '/';
Expand Down Expand Up @@ -149,7 +150,7 @@ const SignIn: React.FC<RootComponentProps> = props => {
{networkNotSupported && (
<RequiredNetworkStep
setRequiredNetworkLabel={t('To use Ethereum World during the alpha period, ')}
setRequiredNetworkBoldLabel={`${t('youll need to set the')} ${
setRequiredNetworkBoldLabel={`${t(`you'll need to set the`)} ${
selectedProvider === EthProviders.WalletConnect
? 'WalletConnect'
: injectedProvider.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const FormImagePopover: React.FC<IFormImagePopover> = props => {
align={{ top: 'bottom', left: 'left' }}
onClickOutside={closePopover}
onEsc={closePopover}
style={{ zIndex: 999 }}
>
<Box direction="column" pad="xsmall">
<StyledBox
Expand Down
2 changes: 1 addition & 1 deletion ui/widgets/top-bar/src/components/topbar-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from '@akashaproject/ui-awf-hooks';
import { useTranslation } from 'react-i18next';
import { RootComponentProps } from '@akashaproject/ui-awf-typings';
import { StorageKeys } from '@akashaproject/ui-awf-typings/lib/profile';
import { extensionPointsMap } from '../extension-points';

const { lightTheme, Topbar, ThemeSelector, ExtensionPoint } = DS;
Expand Down Expand Up @@ -106,6 +105,7 @@ const TopbarComponent = (props: RootComponentProps) => {
pathName: appRoutes => {
return appRoutes[appRoutes.SIGN_IN];
},
queryStrings: qsStringify => qsStringify({ redirectTo: location.pathname }),
});
};

Expand Down

0 comments on commit 9e22b30

Please sign in to comment.