2017-11-29 23:14:57 +00:00
|
|
|
import React from 'react';
|
|
|
|
import translate from 'translations';
|
2018-04-26 00:36:29 +00:00
|
|
|
import { TSignMessageRequested } from 'actions/message';
|
2017-11-29 23:14:57 +00:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
message: string;
|
2018-04-26 00:36:29 +00:00
|
|
|
signMessageRequested: TSignMessageRequested;
|
2017-11-29 23:14:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default class SignMessageButton extends React.Component<Props, {}> {
|
|
|
|
public render() {
|
|
|
|
return (
|
2017-12-18 23:29:26 +00:00
|
|
|
<button className="SignMessage-sign btn btn-primary btn-lg" onClick={this.handleSignMessage}>
|
2018-03-22 03:50:25 +00:00
|
|
|
{translate('NAV_SIGNMSG')}
|
2017-11-29 23:14:57 +00:00
|
|
|
</button>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2018-04-26 00:36:29 +00:00
|
|
|
private handleSignMessage = () => {
|
|
|
|
const { signMessageRequested, message } = this.props;
|
2017-11-29 23:14:57 +00:00
|
|
|
|
2018-04-26 00:36:29 +00:00
|
|
|
signMessageRequested(message);
|
2017-11-29 23:14:57 +00:00
|
|
|
};
|
|
|
|
}
|