/** @format */
/**
* External dependencies
*/
import { __, sprintf } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { TabPanel } from '@wordpress/components';
/**
* Internal dependencies
*/
import Count from 'components/count';
import { H, Section } from 'layout/section';
import OrdersList from './orders';
class ActivityPanel extends Component {
constructor() {
super( ...arguments );
this.togglePanel = this.togglePanel.bind( this );
this.state = {
isOpen: false,
currentTab: '',
};
}
togglePanel( tabName ) {
const { currentTab } = this.state;
if ( tabName === this.state.currentTab || '' === currentTab ) {
this.setState( state => ( {
isOpen: ! state.isOpen,
currentTab: state.isOpen ? '' : tabName,
} ) );
return;
}
this.setState( { currentTab: tabName } );
}
getTabs() {
return [
{
name: 'orders',
title: (
{ __( 'Orders', 'woo-dash' ) }{' '}
Coming soon…
; } } render() { const { isOpen } = this.state; const tabs = this.getTabs(); return (