import React from "react";
import {inject, observer} from "mobx-react";
import QueueAnim from 'rc-queue-anim';
import "./style.scss";
import {LINKS} from './../../routes'
import {Link} from 'react-router-dom';
import * as _ from 'lodash';
import DC from 'decimal.js-light';
import NumberFormat from 'react-number-format';
import {
Paper,
Card,
CardActions,
CardHeader,
CardMedia,
CardTitle,
CardText,
FlatButton,
GridList,
GridTile,
Divider,
Step,
Stepper,
StepLabel,
StepButton,
RaisedButton,
} from 'material-ui';
const {
LineChart,
AreaChart,
BarChart,
Bar,
Line,
XAxis,
YAxis,
ReferenceLine,
CartesianGrid,
Tooltip,
Legend,
Area,
ResponsiveContainer
} = require('recharts/umd/Recharts.min');
@inject('appstate')
@observer
export default class CardAgent extends React.Component {
constructor(props) {
super(props);
this.props = props;
this.state = {
stepIndex: 1,
stepAccount : false,
stepDeposit : false,
stepChallenge : false,
};
this.defaultState = Object.assign({}, this.state);
this.globalUI = props.appstate.globalUI;
this
.globalUI
.changeBackgroundColor("#f7f7f7");
// .changeBackgroundColor("#208166");
this.dashboardStore = props.appstate.dashboard;
this.authStore = props.appstate.auth;
this.userData = props.appstate.userData;
this.transactionStore = props.appstate.transaction;
}
componentDidMount() {
// this.transactionStore.getAmount();
}
componentWillUnmount() {
this
.globalUI
.changeBackgroundColor("#fff");
}
getValue = (data)=> {
if(data == null){
return 0
}
else{
return data
}
}
render() {
const money = new DC(this.transactionStore.saldo.amount || 0).toFixed(2);
const uang =