// @flow import React, { Component } from 'react' import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup' import { MdSearch } from 'react-icons/lib/md' import Payments from './components/Payments' import Invoices from './components/Invoices' import styles from './Activity.scss' class Activity extends Component { constructor(props, context) { super(props, context) this.state = { tab: 1 } } componentWillMount() { const { fetchPayments, fetchInvoices } = this.props fetchPayments() fetchInvoices() } render() { const { tab } = this.state const { ticker, invoice: { invoices, invoiceLoading }, payment: { payments, paymentLoading } } = this.props if (invoiceLoading || paymentLoading) { return
Loading...
} return (
this.setState({ tab: 1 })} > Payments this.setState({ tab: 2 })} > Requests
{ tab === 1 ? : }
) } } export default Activity