Skip to content

Commit

Permalink
Stats: query likes for post before selecting it (#95236)
Browse files Browse the repository at this point in the history
* fix like count for odyssey

* we need to query the data before selecting likes
  • Loading branch information
kangzj authored Oct 9, 2024
1 parent b7ea02c commit be8ca05
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PostStatsCard, ComponentSwapper, DotPager } from '@automattic/component
import { createSelector } from '@automattic/state-utils';
import { useTranslate } from 'i18n-calypso';
import moment from 'moment';
import QueryPostLikes from 'calypso/components/data/query-post-likes';
import QueryPostStats from 'calypso/components/data/query-post-stats';
import QueryPosts from 'calypso/components/data/query-posts';
import QuerySiteStats from 'calypso/components/data/query-site-stats';
Expand Down Expand Up @@ -182,6 +183,7 @@ export default function PostCardsGroup( {
<>
<QueryPosts siteId={ siteId } postId={ topViewedPost.id } query={ {} } />
<QueryPostStats siteId={ siteId } postId={ topViewedPost.id } />
<QueryPostLikes siteId={ siteId } postId={ topViewedPost.id } />
</>
) }

Expand Down

0 comments on commit be8ca05

Please sign in to comment.