// @flow import React from 'react'; import translate from 'translations'; import { donationAddressMap } from 'config/data'; export default class Donate extends React.Component { props: { onDonate: (address: string, amount: string, unit: string) => void }; state: { clicked: boolean } = { clicked: false }; render() { return (

{translate('sidebar_donation')}

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