import { donationAddressMap } from 'config/data'; 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 }); }; }