Skip to content

Commit

Permalink
Stats: Preserve StatsNavigation site slug in Insights (Automattic#13471)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored Apr 28, 2017
1 parent 1230dc8 commit 98c6d5c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/my-sites/stats/stats-insights/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import StatsFirstView from '../stats-first-view';
import SectionHeader from 'components/section-header';
import StatsViews from '../stats-views';
import Followers from '../stats-followers';
import { getSelectedSiteId } from 'state/ui/selectors';
import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors';
import { isJetpackSite } from 'state/sites/selectors';

const StatsInsights = ( props ) => {
const { followList, isJetpack, siteId, translate } = props;
const { followList, isJetpack, siteId, siteSlug, translate } = props;
const moduleStrings = statsStrings();

let tagsList;
Expand All @@ -48,7 +48,7 @@ const StatsInsights = ( props ) => {
<Main wideLayout>
<StatsFirstView />
<SidebarNavigation />
<StatsNavigation section="insights" />
<StatsNavigation section="insights" slug={ siteSlug } />
<div>
<PostingActivity />
<SectionHeader label={ translate( 'All Time Views' ) } />
Expand Down Expand Up @@ -97,7 +97,8 @@ const connectComponent = connect(
const siteId = getSelectedSiteId( state );
return {
isJetpack: isJetpackSite( state, siteId ),
siteId
siteId,
siteSlug: getSelectedSiteSlug( state, siteId ),
};
}
);
Expand Down

0 comments on commit 98c6d5c

Please sign in to comment.