Newer
Older
import TransactionList from './TransactionList';
import { printMoney } from './util';
class Dashboard extends React.Component {
static contextType = AuthContext;
constructor(props) {
super(props);
this.state = {
name: null,
onFetch={member => this.setState({ balance: member.balance, name: member.name})} >
<Container>
<Row>
<Col xs>
<div className="text-right">
<h6>{this.state.name}</h6>
<h1>{printMoney(this.state.balance)}€</h1>
</div>
</Col>
<Col xs={{ offset: 0 }} md={{ offset: 1 }}>
<br />
<Button variant="success" href="/purchase">Compra</Button>
</Col>
</Row>