// @flow import React, { PureComponent, Fragment } from 'react'; import { WalletSummaryComponent } from '../components/wallet-summary'; import { TransactionDailyComponent } from '../components/transaction-daily'; import type { Transaction } from '../components/transaction-item'; type Props = { getSummary: () => void, total: number, shielded: number, transparent: number, error: string | null, isLoading: boolean, zecPrice: number, addresses: string[], transactions: { [day: string]: Transaction[] }, }; export class DashboardView extends PureComponent { componentDidMount() { /* eslint-disable-next-line */ this.props.getSummary(); } render() { const { error, isLoading, total, shielded, transparent, zecPrice, addresses, transactions, } = this.props; const days = Object.keys(transactions); if (error) { return error; } return ( {isLoading ? ( 'Loading' ) : ( {days.map(day => ( ))} )} ); } }