add comment stats to creator analytics

+ fix up other minor issues and added weekly change figure to recent content

app strings
This commit is contained in:
Thomas Zarebczan 2020-08-27 16:31:22 -04:00 committed by Sean Yesmunt
parent e797b26c36
commit 20f932f935
2 changed files with 36 additions and 3 deletions

View file

@ -1281,5 +1281,8 @@
"Not Now": "Not Now", "Not Now": "Not Now",
"Enter your phone number and we will send you a verification code. We will not share your phone number with third parties.": "Enter your phone number and we will send you a verification code. We will not share your phone number with third parties.", "Enter your phone number and we will send you a verification code. We will not share your phone number with third parties.": "Enter your phone number and we will send you a verification code. We will not share your phone number with third parties.",
"Number": "Number", "Number": "Number",
"%view_count% views - %view_count_change% this week": "%view_count% views - %view_count_change% this week",
"Most Commented Recent Content": "Most Commented Recent Content",
"%comment_count% comments - %comment_count_change% this week": "%comment_count% comments - %comment_count_change% this week",
"--end--": "--end--" "--end--": "--end--"
} }

View file

@ -179,10 +179,13 @@ export default function CreatorAnalytics(props: Props) {
<div className="section__subtitle card__data-subtitle"> <div className="section__subtitle card__data-subtitle">
<span> <span>
{stats.VideoViewsTopNew === 1 {stats.VideoViewsTopNew === 1
? __('1 view', { view_count: stats.VideoViewsTopNew }) ? __('1 view')
: __('%view_count% views', { view_count: stats.VideoViewsTopNew })} : __('%view_count% views - %view_count_change% this week', {
view_count: stats.VideoViewsTopNew,
view_count_change: stats.VideoViewChangeTopNew,
})}
</span> </span>
{stats.VideoViewsTopNew > 0 && <Icon icon={ICONS.TRENDING} iconColor="green" size={18} />} {stats.VideoViewChangeTopNew > 0 && <Icon icon={ICONS.TRENDING} iconColor="green" size={18} />}
</div> </div>
</React.Fragment> </React.Fragment>
} }
@ -213,6 +216,33 @@ export default function CreatorAnalytics(props: Props) {
/> />
)} )}
{stats.VideoURITopCommentNew && stats.VideoCommentTopCommentNew > 0 && (
<Card
className="section"
title={__('Most Commented Recent Content')}
body={
<React.Fragment>
<div className="card--inline">
<ClaimPreview uri={stats.VideoURITopCommentNew} />
</div>
<div className="section__subtitle card__data-subtitle">
<span>
{stats.VideoCommentTopCommentNew === 1
? __('1 comment')
: __('%comment_count% comments - %comment_count_change% this week', {
comment_count: stats.VideoCommentTopCommentNew,
comment_count_change: stats.VideoCommentChangeTopCommentNew,
})}
</span>
{stats.VideoCommentChangeTopCommentNew > 0 && (
<Icon icon={ICONS.TRENDING} iconColor="green" size={18} />
)}
</div>
</React.Fragment>
}
/>
)}
<Card <Card
className="section" className="section"
title={__('Most Viewed Content All Time')} title={__('Most Viewed Content All Time')}