/* @flow */
'use strict';
import React, { Component } from 'react';
import TrezorConnect from 'trezor-connect';
export default class InstallBridge extends Component {
componentDidMount(): void {
const transport: any = this.props.transport;
if (transport && transport.version.indexOf('webusb') >= 0)
TrezorConnect.renderWebUSBButton();
}
componentDidUpdate() {
const transport = this.props.transport;
if (transport && transport.version.indexOf('webusb') >= 0)
TrezorConnect.renderWebUSBButton();
}
render() {
let css = 'row';
let webusb = null;
let connectClaim = 'Connect TREZOR to continue';
let and = null;
let bridgeClaim = null;
const transport = this.props.transport;
if (transport && transport.version.indexOf('webusb') >= 0) {
css = 'row webusb'
webusb = ;
connectClaim = 'Connect TREZOR';
and =
and
;
bridgeClaim = Device not recognized? Try installing the TREZOR Bridge.;
}
return (
The private bank in your hands.
TREZOR Wallet is an easy-to-use interface for your TREZOR.
TREZOR Wallet allows you to easily control your funds, manage your balance and initiate transfers.
{ connectClaim }
and
{ bridgeClaim }
Don't have TREZOR? Get one
);
}
}