|
|
@ -1,6 +1,6 @@
|
|
|
|
/* @flow */
|
|
|
|
/* @flow */
|
|
|
|
import styled from 'styled-components';
|
|
|
|
import styled from 'styled-components';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import React from 'react';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
import { FONT_SIZE } from 'config/variables';
|
|
|
|
import { FONT_SIZE } from 'config/variables';
|
|
|
|
|
|
|
|
|
|
|
@ -62,17 +62,14 @@ const LogoWrapper = styled.div`
|
|
|
|
align-items: center;
|
|
|
|
align-items: center;
|
|
|
|
`;
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
class CoinsSettings extends Component {
|
|
|
|
const CoinsSettings = (props: Props) => (
|
|
|
|
render() {
|
|
|
|
|
|
|
|
const { networks, handleCoinVisibility } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<Wrapper>
|
|
|
|
<Wrapper>
|
|
|
|
<Row>
|
|
|
|
<Row>
|
|
|
|
<Label>
|
|
|
|
<Label>
|
|
|
|
<FormattedMessage {...l10nMessages.TR_VISIBLE_COINS} />
|
|
|
|
<FormattedMessage {...l10nMessages.TR_VISIBLE_COINS} />
|
|
|
|
</Label>
|
|
|
|
</Label>
|
|
|
|
<Content>
|
|
|
|
<Content>
|
|
|
|
{networks
|
|
|
|
{props.networks
|
|
|
|
.filter(network => !network.isHidden)
|
|
|
|
.filter(network => !network.isHidden)
|
|
|
|
.map(network => (
|
|
|
|
.map(network => (
|
|
|
|
<CoinRow key={network.shortcut}>
|
|
|
|
<CoinRow key={network.shortcut}>
|
|
|
@ -85,9 +82,9 @@ class CoinsSettings extends Component {
|
|
|
|
<Right>
|
|
|
|
<Right>
|
|
|
|
<Switch
|
|
|
|
<Switch
|
|
|
|
onChange={isVisible => {
|
|
|
|
onChange={isVisible => {
|
|
|
|
handleCoinVisibility(network.shortcut, !isVisible);
|
|
|
|
props.handleCoinVisibility(network.shortcut, !isVisible);
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
checked
|
|
|
|
checked={props.hiddenCoins.includes(network.shortcut)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Right>
|
|
|
|
</Right>
|
|
|
|
</CoinRow>
|
|
|
|
</CoinRow>
|
|
|
@ -95,8 +92,6 @@ class CoinsSettings extends Component {
|
|
|
|
</Content>
|
|
|
|
</Content>
|
|
|
|
</Row>
|
|
|
|
</Row>
|
|
|
|
</Wrapper>
|
|
|
|
</Wrapper>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default CoinsSettings;
|
|
|
|
export default CoinsSettings;
|
|
|
|