1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-30 19:00:53 +00:00

Cleanup & fix imports

This commit is contained in:
Vasek Mlejnsky 2018-08-16 16:31:43 +02:00
parent 113b2535e0
commit ba0d8d4095
4 changed files with 45 additions and 45 deletions

View File

@ -13,9 +13,9 @@ import { findDeviceAccounts } from 'reducers/AccountsReducer';
import { FONT_SIZE, BORDER_WIDTH } from 'config/variables';
import type { Accounts } from 'flowtype';
import type { Props } from './index';
import type { Props } from '../../common';
import Row from '../Row';
import Row from '../../Row';
const RowAccountWrapper = styled.div`
height: 64px;
@ -45,22 +45,22 @@ const RowAccountWrapper = styled.div`
const RowAccount = ({
accountIndex, balance, url, isSelected = false,
}) => (
<NavLink to={url}>
<RowAccountWrapper
to={url}
isSelected={isSelected}
>
<Row column>
Account #{accountIndex + 1}
{balance ? (
<span>{balance}</span>
) : (
<span>Loading...</span>
)}
</Row>
</RowAccountWrapper>
</NavLink>
);
<NavLink to={url}>
<RowAccountWrapper
to={url}
isSelected={isSelected}
>
<Row column>
Account #{accountIndex + 1}
{balance ? (
<span>{balance}</span>
) : (
<span>Loading...</span>
)}
</Row>
</RowAccountWrapper>
</NavLink>
);
RowAccount.propTypes = {
accountIndex: PropTypes.number.isRequired,
url: PropTypes.string.isRequired,

View File

@ -10,8 +10,8 @@ import styled from 'styled-components';
import { FONT_SIZE, ICON_SIZE } from 'config/variables';
import Divider from '../Divider';
import Row from '../Row';
import Divider from '../../Divider';
import Row from '../../Row';
const CoinNameWrapper = styled.div`
display: flex;
@ -31,13 +31,13 @@ const Logo = styled.div`
const CoinName = ({
coinImg, text,
}) => (
<CoinNameWrapper>
<Logo
coinImg={coinImg}
/>
<p>{text}</p>
</CoinNameWrapper>
);
<CoinNameWrapper>
<Logo
coinImg={coinImg}
/>
<p>{text}</p>
</CoinNameWrapper>
);
CoinName.propTypes = {
coinImg: PropTypes.string.isRequired,
text: PropTypes.string.isRequired,
@ -56,21 +56,21 @@ const RowCoinWrapper = styled.div`
const RowCoin = ({
coin, icon,
}) => (
<RowCoinWrapper>
<Row>
<CoinName
coinImg={coin.img}
text={coin.name}
<RowCoinWrapper>
<Row>
<CoinName
coinImg={coin.img}
text={coin.name}
/>
{icon && (
<Icon
icon={icon.type}
color={icon.color}
/>
{icon && (
<Icon
icon={icon.type}
color={icon.color}
/>
)}
</Row>
</RowCoinWrapper>
);
)}
</Row>
</RowCoinWrapper>
);
RowCoin.propTypes = {
coin: PropTypes.shape({
img: PropTypes.string.isRequired,

View File

@ -4,9 +4,9 @@ import TrezorConnect from 'trezor-connect';
import type { TrezorDevice } from 'flowtype';
import type { Props } from '../common';
import type { Props } from '../../common';
import AsideDivider from '../Divider';
import AsideDivider from '../../Divider';
export const DeviceSelect = (props: Props) => {
const { devices } = props;

View File

@ -9,10 +9,10 @@ import {
CoinMenu,
DeviceSelect,
DeviceDropdown,
} from './Menu';
} from './NavigationMenu';
import StickyContainer from './StickyContainer';
import type { Props } from './index';
import type { Props } from './common';
type TransitionMenuProps = {
animationType: string;