Commit ed2e5189 authored by tom's avatar tom

fix modal behaviour

parent bb7df432
......@@ -64,7 +64,7 @@ const RewardsLoginModal = () => {
<DialogRoot
open={ isLoginModalOpen && !isWalletModalOpen && !authModal.open }
onOpenChange={ handleOpenChange }
size={{ base: 'full', lg: isLoginStep ? 'sm' : 'md' }}
size={{ lgDown: 'full', lg: isLoginStep ? 'sm' : 'md' }}
>
<DialogContent>
<DialogHeader>
......
......@@ -170,7 +170,7 @@ const AuthModal = ({ initialScreen, onClose, mixpanelConfig, closeOnError }: Pro
<DialogRoot
open
onOpenChange={ onModalOpenChange }
size={{ base: 'full', lg: 'sm' }}
size={{ lgDown: 'full', lg: 'sm' }}
// we need to allow user interact with element outside of dialog otherwise they can't click on recaptcha
modal={ false }
// FIXME if we allow to close on interact outside, the dialog will be closed when user click on recaptcha
......
......@@ -24,7 +24,7 @@ interface Props {
isPending?: boolean;
}
const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }: Props, ref: React.ForwardedRef<HTMLButtonElement>) => {
const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending, ...rest }: Props, ref: React.ForwardedRef<HTMLButtonElement>) => {
const [ isFetched, setIsFetched ] = useState(false);
const isMobile = useIsMobile();
......@@ -87,6 +87,7 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
px={ dataExists ? 2.5 : 4 }
fontWeight={ dataExists ? 700 : 600 }
loading={ isButtonLoading }
{ ...rest }
>
{ content }
</Button>
......@@ -94,4 +95,4 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
);
};
export default React.memo(React.forwardRef(UserProfileButton));
export default React.forwardRef(UserProfileButton);
......@@ -73,7 +73,7 @@ const UserProfileDesktop = ({ buttonSize, buttonVariant = 'header' }: Props) =>
return (
<>
<PopoverRoot positioning={{ placement: 'bottom-end' }} lazyMount open={ profileMenu.open } onOpenChange={ handleOpenChange }>
<PopoverRoot positioning={{ placement: 'bottom-end' }} open={ profileMenu.open } onOpenChange={ handleOpenChange }>
<PopoverTrigger>
<UserProfileButton
profileQuery={ profileQuery }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment