Skip to content

Commit

Permalink
drill down year to months (#97308)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangzj authored Dec 11, 2024
1 parent 954a731 commit 377418f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/my-sites/stats/site.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ class StatsSite extends Component {
}

// Determine the target period for the navigation.
const targetPeriod = period === 'day' ? 'hour' : 'day';
let targetPeriod = 'day';
if ( period === 'day' ) {
targetPeriod = 'hour';
} else if ( period === 'year' ) {
targetPeriod = 'month';
}

const path = `/stats/${ targetPeriod }/${ this.props.slug }`;
const url = getPathWithUpdatedQueryString( { chartStart, chartEnd }, path );
Expand Down

0 comments on commit 377418f

Please sign in to comment.