// @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() { this.props.fetchActivity() } render() { const { tab } = this.state const { ticker, activity: { activityLoading, payments, invoices } } = this.props if (activityLoading) { return
Loading...
} return (
this.setState({ tab: 1 })} > Payments this.setState({ tab: 2 })} > Invoices
{ tab === 1 ? : }
) } } export default Activity