Revenue Report: Use href on SummaryNumber components.

This commit is contained in:
Timmy Crawford 2018-08-20 13:40:17 -07:00
parent 11524e19e1
commit f555fed33a
1 changed files with 3 additions and 5 deletions

View File

@ -14,7 +14,7 @@ import PropTypes from 'prop-types';
import Card from 'components/card'; import Card from 'components/card';
import Chart from 'components/chart'; import Chart from 'components/chart';
import { formatCurrency, getCurrencyFormatDecimal } from 'lib/currency'; import { formatCurrency, getCurrencyFormatDecimal } from 'lib/currency';
import { getAdminLink, updateQueryString } from 'lib/nav-utils'; import { getAdminLink, getNewPath, updateQueryString } from 'lib/nav-utils';
import { getReportData } from 'lib/swagger'; import { getReportData } from 'lib/swagger';
import Header from 'layout/header'; import Header from 'layout/header';
import { ReportFilters } from 'components/filters'; import { ReportFilters } from 'components/filters';
@ -250,9 +250,7 @@ class RevenueReport extends Component {
break; break;
} }
const onClick = () => { const href = getNewPath( { chart: key } );
this.onQueryChange( 'chart' )( key );
};
return ( return (
<SummaryNumber <SummaryNumber
@ -261,7 +259,7 @@ class RevenueReport extends Component {
label={ label } label={ label }
selected={ isSelected } selected={ isSelected }
delta={ 0 } delta={ 0 }
onToggle={ onClick } href={ href }
/> />
); );
} ); } );