Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #531 from brave/removes-disconnected-overlay
Browse files Browse the repository at this point in the history
Removes disconnected overlay
  • Loading branch information
NejcZdovc authored Sep 4, 2019
2 parents fe38628 + 3e71149 commit 0ca5339
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 42 deletions.
52 changes: 18 additions & 34 deletions src/features/rewards/walletWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
StyledCopyImage,
StyledIconAction,
StyledBalanceConverted,
StyledBalanceUnavailable,
StyledGrantWrapper,
StyledGrant,
StyledActionWrapper,
Expand Down Expand Up @@ -660,45 +659,30 @@ export default class WalletWrapper extends React.PureComponent<Props, State> {
</StyledIconAction>
: null
}
{
walletState && (walletState === 'disconnected_unverified' || walletState === 'disconnected_verified')
? <StyledBalance>
<StyledBalanceUnavailable>{getLocale('balanceUnavailable')}</StyledBalanceUnavailable>
<StyleGrantButton>
<StyledBalance>
<StyledBalanceTokens data-test-id='balance'>
{balance} <StyledBalanceCurrency>BAT</StyledBalanceCurrency>
</StyledBalanceTokens>
{
converted
? <StyledBalanceConverted>{converted}</StyledBalanceConverted>
: null
}
{
hasGrants
? <StyleGrantButton>
<Button
text={getLocale('reconnectWallet')}
text={getLocale('grants')}
size={'small'}
type={'subtle'}
level={'secondary'}
onClick={onVerifyClick}
onClick={this.toggleGrantDetails}
icon={{ position: 'after', image: this.state.grantDetails ? <CaratUpIcon /> : <CaratDownIcon /> }}
/>
</StyleGrantButton>
</StyledBalance>
: <StyledBalance>
<StyledBalanceTokens data-test-id='balance'>
{balance} <StyledBalanceCurrency>BAT</StyledBalanceCurrency>
</StyledBalanceTokens>
{
converted
? <StyledBalanceConverted>{converted}</StyledBalanceConverted>
: null
}
{
hasGrants
? <StyleGrantButton>
<Button
text={getLocale('grants')}
size={'small'}
type={'subtle'}
level={'secondary'}
onClick={this.toggleGrantDetails}
icon={{ position: 'after', image: this.state.grantDetails ? <CaratUpIcon /> : <CaratDownIcon /> }}
/>
</StyleGrantButton>
: null
}
</StyledBalance>
}
: null
}
</StyledBalance>
{
this.state.grantDetails && hasGrants
? <StyledGrantWrapper>
Expand Down
8 changes: 0 additions & 8 deletions src/features/rewards/walletWrapper/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ export const StyledBalanceTokens = styled<{}, 'div'>('div')`
font-weight: 300;
`

export const StyledBalanceUnavailable = styled<{}, 'div'>('div')`
font-size: 24px;
opacity: 0.66;
color: ${p => p.theme.palette.white};
margin: 10px 0;
font-weight: 300;
`

export const StyledContent = styled<StyledProps, 'div'>('div')`
padding: ${p => p.contentPadding ? '11px 25px 19px' : '0px'};
background: #fff;
Expand Down

0 comments on commit 0ca5339

Please sign in to comment.