Revenue Report: Use href on SummaryNumber components.
This commit is contained in:
parent
11524e19e1
commit
f555fed33a
|
@ -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 }
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue