import { donationAddressMap } from 'config'; import React from 'react'; import translate from 'translations'; interface Props { onDonate(address: string, amount: string, unit: string): void; } interface State { clicked: boolean; } export default class Donate extends React.Component { public state = { clicked: false }; public render() { return (

{translate('SIDEBAR_DONATION')}

{translate('SIDEBAR_DONATE')} {this.state.clicked && (
{translate('SIDEBAR_THANKS')}
)}
); } public onClick = () => { // FIXME move to config this.props.onDonate(donationAddressMap.ETH, '1', 'ETH'); this.setState({ clicked: true }); }; }