/* @flow */ import React from 'react'; import styled from 'styled-components'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import { Button, Link, P, H4, colors } from 'trezor-ui-components'; import { getOldWalletReleaseUrl } from 'utils/url'; import { FONT_SIZE } from 'config/variables'; import * as deviceUtils from 'utils/device'; import * as RouterActions from 'actions/RouterActions'; import l10nCommonMessages from 'views/common.messages'; import type { TrezorDevice, State, Dispatch } from 'flowtype'; import l10nMessages from './index.messages'; type OwnProps = {||}; type StateProps = {| device: ?TrezorDevice, |}; type DispatchProps = {| cancel: typeof RouterActions.selectFirstAvailableDevice, |}; type Props = {| ...OwnProps, ...StateProps, ...DispatchProps |}; const Wrapper = styled.section` display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 90px 35px 40px 35px; `; const StyledNavLink = styled(Link)` color: ${colors.TEXT_SECONDARY}; padding-top: 20px; font-size: ${FONT_SIZE.BASE}; `; const Image = styled.div` padding-bottom: 30px; `; const StyledP = styled(P)` padding: 0 0 15px 0; text-align: center; `; const FirmwareUpdate = (props: Props) => ( Chip

{deviceUtils.isDeviceAccessible(props.device) && ( )}
); export default connect( (state: State): StateProps => ({ device: state.wallet.selectedDevice, }), (dispatch: Dispatch): DispatchProps => ({ cancel: bindActionCreators(RouterActions.selectFirstAvailableDevice, dispatch), }) )(FirmwareUpdate);