0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fixed analytics button not working

no issue
This commit is contained in:
Simon Backx 2022-09-29 17:42:25 +02:00
parent c44e7d1536
commit 58cabc68ec

View file

@ -11,12 +11,15 @@ export default class PostsListItemClicks extends Component {
@tracked isHovered = false;
get post() {
return this.args.post;
}
get scheduledText() {
let {post} = this.args;
let text = [];
let formattedTime = formatPostTime(
post.publishedAtUTC,
this.post.publishedAtUTC,
{timezone: this.settings.get('timezone'), scheduled: true}
);
text.push(formattedTime);
@ -25,17 +28,17 @@ export default class PostsListItemClicks extends Component {
}
get routeForLink() {
if (this.isAnalytics) {
if (this.post.hasAnalyticsPage) {
return 'posts.analytics';
}
return 'editor.edit';
}
get modelsForLink() {
if (this.isAnalytics) {
return [this.args.post];
if (this.post.hasAnalyticsPage) {
return [this.post];
}
return [this.args.post.displayName, this.args.post.id];
return [this.post.displayName, this.post.id];
}
@action