mirror of https://github.com/trezor/trezor-wallet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
52 lines
1.3 KiB
6 years ago
|
/* @flow */
|
||
|
'use strict';
|
||
|
|
||
|
import React from 'react';
|
||
6 years ago
|
import { bindActionCreators } from 'redux';
|
||
|
import { connect } from 'react-redux';
|
||
6 years ago
|
import { Notification } from '../../common/Notification';
|
||
|
import * as TrezorConnectActions from '../../../actions/TrezorConnectActions';
|
||
6 years ago
|
|
||
6 years ago
|
import type { State, Dispatch } from '../../../flowtype';
|
||
6 years ago
|
type Props = {
|
||
|
connect: $ElementType<State, 'connect'>,
|
||
|
acquireDevice: typeof TrezorConnectActions.acquire
|
||
|
}
|
||
|
|
||
|
const Acquire = (props: Props) => {
|
||
6 years ago
|
|
||
|
const actions = [
|
||
|
{
|
||
|
label: 'Acquire device',
|
||
|
callback: () => {
|
||
|
props.acquireDevice()
|
||
|
}
|
||
|
}
|
||
|
];
|
||
|
|
||
6 years ago
|
return (
|
||
|
<section className="acquire">
|
||
6 years ago
|
<Notification
|
||
|
title="Device is used in other window"
|
||
|
message="Do you want to use your device in this window?"
|
||
|
className="info"
|
||
6 years ago
|
cancelable={ false }
|
||
|
actions={ actions }
|
||
6 years ago
|
/>
|
||
6 years ago
|
</section>
|
||
|
);
|
||
|
}
|
||
|
|
||
6 years ago
|
export default connect(
|
||
|
(state: State) => {
|
||
|
return {
|
||
|
log: state.log
|
||
|
};
|
||
|
},
|
||
|
(dispatch: Dispatch) => {
|
||
|
return {
|
||
6 years ago
|
acquireDevice: bindActionCreators(TrezorConnectActions.acquire, dispatch),
|
||
6 years ago
|
};
|
||
|
}
|
||
|
)(Acquire);
|