Skip to content

Commit

Permalink
feat(lag): remove uneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbuchann committed Nov 30, 2021
1 parent 31f86d4 commit ef74a29
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,46 @@ const Subcontent = styled(Text)`
text-align: center;
`

const BuySellLimitReached: React.FC<Props> = ({ handleClose, limitNumber }) => {
return (
<FlyoutContainer>
<FlyoutHeader mode='close' data-e2e='BSLimitReachedHeader' onClick={handleClose} />
<FlyoutContent mode='middle'>
<div style={{ textAlign: 'center' }}>
<Image
width='48px'
height='48px'
name='world-alert'
srcset={{ 'world-alert2': '2x', 'world-alert3': '3x' }}
const BuySellLimitReached: React.FC<Props> = ({ handleClose, limitNumber }) => (
<FlyoutContainer>
<FlyoutHeader mode='close' data-e2e='BSLimitReachedHeader' onClick={handleClose} />
<FlyoutContent mode='middle'>
<div style={{ textAlign: 'center' }}>
<Image
width='48px'
height='48px'
name='world-alert'
srcset={{ 'world-alert2': '2x', 'world-alert3': '3x' }}
/>
<Title color='grey800' size='20px' weight={600}>
<FormattedMessage
id='modals.simplebuy.limit_reached_title'
defaultMessage="You've reached your limit"
/>
<Title color='grey800' size='20px' weight={600}>
<FormattedMessage
id='modals.simplebuy.limit_reached_title'
defaultMessage="You've reached your limit"
/>
</Title>
<Subcontent color='grey600' weight={500}>
<FormattedMessage
id='modals.simplebuy.limit_reached_sub_title'
defaultMessage='The maximum amount of pending orders is {limitNumber}'
values={{ limitNumber }}
/>
</Subcontent>
</div>
<FlyoutFooter>
<Button
data-e2e='closeBSLimitReached'
height='48px'
size='16px'
nature='primary'
onClick={handleClose}
fullwidth
>
<FormattedMessage id='buttons.ok' defaultMessage='OK' />
</Button>
</FlyoutFooter>
</FlyoutContent>
</FlyoutContainer>
)
}
</Title>
<Subcontent color='grey600' weight={500}>
<FormattedMessage
id='modals.simplebuy.limit_reached_sub_title'
defaultMessage='The maximum amount of pending orders is {limitNumber}'
values={{ limitNumber }}
/>
</Subcontent>
</div>
<FlyoutFooter>
<Button
data-e2e='closeBSLimitReached'
height='48px'
size='16px'
nature='primary'
onClick={handleClose}
fullwidth
>
<FormattedMessage id='buttons.ok' defaultMessage='OK' />
</Button>
</FlyoutFooter>
</FlyoutContent>
</FlyoutContainer>
)

export type Props = {
handleClose: () => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import { OwnProps } from '.'
export const getData = (state: RootState, ownProps: OwnProps) => {
const ratesR = selectors.core.data.misc.getRatesSelector(ownProps.coin, state)
const fiatCurrency = selectors.components.buySell.getFiatCurrency(state)
const balances = selectors.components.buySell.getBSBalances(state)

return lift((rates: ExtractSuccess<typeof ratesR>) => ({
balances,
fiatCurrency,
rates
}))(ratesR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = (props) => {
fiat={props.fiatCurrency || 'USD'}
coin={props.cryptoCurrency}
orderType={props.orderType}
account={props.swapAccount}
/>
<FlyoutWrapper
style={{
Expand Down

0 comments on commit ef74a29

Please sign in to comment.