Commit bd8afb6a authored by Max Alekseenko's avatar Max Alekseenko

fix paddings

parent f3cb3711
...@@ -37,7 +37,7 @@ const RewardsButton = ({ variant = 'header', size }: Props) => { ...@@ -37,7 +37,7 @@ const RewardsButton = ({ variant = 'header', size }: Props) => {
onFocus={ e => e.preventDefault() } // eslint-disable-line onFocus={ e => e.preventDefault() } // eslint-disable-line
fontSize="sm" fontSize="sm"
size={ size } size={ size }
px={ 2.5 } px={ !isLoading && Boolean(apiToken) ? 2.5 : 4 }
isLoading={ isLoading } isLoading={ isLoading }
loadingText={ isMobile ? undefined : 'Merits' } loadingText={ isMobile ? undefined : 'Merits' }
textDecoration="none !important" textDecoration="none !important"
......
...@@ -61,6 +61,7 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }: ...@@ -61,6 +61,7 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
})(); })();
const isButtonLoading = isPending || !isFetched; const isButtonLoading = isPending || !isFetched;
const dataExists = !isButtonLoading && (Boolean(data) || Boolean(web3AccountWithDomain.address));
return ( return (
<Tooltip <Tooltip
...@@ -76,12 +77,12 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }: ...@@ -76,12 +77,12 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
variant={ variant } variant={ variant }
onClick={ onClick } onClick={ onClick }
onFocus={ e => e.preventDefault() } // eslint-disable-line onFocus={ e => e.preventDefault() } // eslint-disable-line
data-selected={ !isButtonLoading && (Boolean(data) || Boolean(web3AccountWithDomain.address)) } data-selected={ dataExists }
data-warning={ isAutoConnectDisabled } data-warning={ isAutoConnectDisabled }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
px={ data ? 2.5 : 4 } px={ dataExists ? 2.5 : 4 }
fontWeight={ data ? 700 : 600 } fontWeight={ dataExists ? 700 : 600 }
isLoading={ isButtonLoading } isLoading={ isButtonLoading }
loadingText={ isMobile ? undefined : 'Log in' } loadingText={ isMobile ? undefined : 'Log in' }
> >
......
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