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.
trezor-wallet/src/js/components/common/Log.js

41 lines
1.0 KiB

6 years ago
/* @flow */
'use strict';
import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
6 years ago
import * as LogActions from '../../actions/LogActions';
import type { State, Dispatch } from '../../flowtype';
6 years ago
type Props = {
log: $ElementType<State, 'log'>,
toggle: typeof LogActions.toggle
}
6 years ago
const Log = (props: Props): ?React$Element<string> => {
6 years ago
if (!props.log.opened)
return null;
6 years ago
6 years ago
return (
<div className="log">
<button className="log-close transparent" onClick={ props.toggle }></button>
<h2>Log</h2>
<p>Attention: The log contains your XPUBs. Anyone with your XPUBs can see your account history.</p>
<textarea></textarea>
</div>
)
6 years ago
}
export default connect(
(state: State) => {
6 years ago
return {
6 years ago
log: state.log
6 years ago
};
},
(dispatch: Dispatch) => {
6 years ago
return {
6 years ago
toggle: bindActionCreators(LogActions.toggle, dispatch),
6 years ago
};
}
)(Log);