Skip to content

Commit

Permalink
Stats: Fix StickyPanel header ID for Simple sites WP-Admin (#97218)
Browse files Browse the repository at this point in the history
  • Loading branch information
dognose24 authored Dec 9, 2024
1 parent f2d386b commit 181792a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/my-sites/stats/site.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ class StatsSite extends Component {
'stats__flexible-grid-item--full--medium'
);

// TODO: Fix isOdysseyStats to include the environment running on WP-Admin of Simple sites.
const isRunningOnWPAdmin = document.getElementById( 'wpadminbar' );

return (
<div className="stats">
{ ! isOdysseyStats && (
Expand Down Expand Up @@ -472,7 +475,7 @@ class StatsSite extends Component {
) }
{ isNewDateFilteringEnabled && (
// moves date range block into new location
<StickyPanel headerId={ isOdysseyStats ? 'wpadminbar' : 'header' }>
<StickyPanel headerId={ isRunningOnWPAdmin ? 'wpadminbar' : 'header' }>
<StatsPeriodHeader>
<StatsPeriodNavigation
date={ date }
Expand Down

0 comments on commit 181792a

Please sign in to comment.