1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-03-12 06:36:04 +00:00
trezor-wallet/src/js/components/modal/DuplicateDevice.js

21 lines
764 B
JavaScript
Raw Normal View History

2018-02-20 09:30:36 +00:00
/* @flow */
'use strict';
import React from 'react';
2018-05-05 11:52:03 +00:00
import type { Props } from './index';
2018-02-20 09:30:36 +00:00
2018-05-05 11:52:03 +00:00
const RememberDevice = (props: Props) => {
if (!props.modal.opened) return null;
2018-02-20 09:30:36 +00:00
const { device } = props.modal;
const { onCancel, onDuplicateDevice } = props.modalActions;
return (
<div className="duplicate">
<h3>Clone { device.instanceLabel }?</h3>
<p>This will create new instance of device which can be used with different passphrase</p>
<button onClick={ event => onDuplicateDevice( { ...device, instanceLabel: "TODO: user label from input" } ) }>Create new instance</button>
<button className="white" onClick={ onCancel }>Cancel</button>
2018-02-20 09:30:36 +00:00
</div>
);
}
export default RememberDevice;