1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-26 08:58:06 +00:00

discovery status css fix

- DiscoveryStatusWrapper css fix (wodth 100%)
- rewriten first condition
This commit is contained in:
Szymon Lesisz 2018-10-22 10:02:30 +02:00
parent 1f517733fc
commit a534830dff

View File

@ -78,7 +78,7 @@ const AddAccountIconWrapper = styled.div`
const DiscoveryStatusWrapper = styled.div` const DiscoveryStatusWrapper = styled.div`
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%;
font-size: ${FONT_SIZE.SMALL}; font-size: ${FONT_SIZE.SMALL};
padding: ${LEFT_NAVIGATION_ROW.PADDING}; padding: ${LEFT_NAVIGATION_ROW.PADDING};
white-space: nowrap; white-space: nowrap;
@ -164,8 +164,7 @@ const AccountMenu = (props: Props) => {
let discoveryStatus = null; let discoveryStatus = null;
const discovery = props.discovery.find(d => d.deviceState === selected.state && d.network === location.state.network); const discovery = props.discovery.find(d => d.deviceState === selected.state && d.network === location.state.network);
if (discovery) { if (discovery && discovery.completed) {
if (discovery.completed) {
// TODO: add only if last one is not empty // TODO: add only if last one is not empty
//if (selectedAccounts.length > 0 && selectedAccounts[selectedAccounts.length - 1]) //if (selectedAccounts.length > 0 && selectedAccounts[selectedAccounts.length - 1])
const lastAccount = deviceAccounts[deviceAccounts.length - 1]; const lastAccount = deviceAccounts[deviceAccounts.length - 1];
@ -206,7 +205,7 @@ const AccountMenu = (props: Props) => {
</Tooltip> </Tooltip>
); );
} }
} else if (!selected.connected || !selected.available) { } else if (!selected.connected) {
discoveryStatus = ( discoveryStatus = (
<Row> <Row>
<DiscoveryStatusWrapper> <DiscoveryStatusWrapper>
@ -229,7 +228,7 @@ const AccountMenu = (props: Props) => {
</Row> </Row>
); );
} }
}
return ( return (
<Wrapper> <Wrapper>