Ghost/ghost/admin/app/components/dashboard/charts/attribution.js
Rishabh 890279a95b Added mock UI table for member source data
refs https://github.com/TryGhost/Team/issues/1891

- uses mock stats data to show UI for which sources are driving member signups/conversions
2022-09-13 15:48:50 +05:30

26 lines
660 B
JavaScript

import Component from '@glimmer/component';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
// import {tracked} from '@glimmer/tracking';
export default class Recents extends Component {
@service dashboardStats;
@action
loadData() {
this.dashboardStats.loadMemberAttributionStats();
}
get sources() {
return this.dashboardStats?.membersAttributionSources90d || [];
}
get areMembersEnabled() {
return this.dashboardStats.siteStatus?.membersEnabled;
}
get areNewslettersEnabled() {
return this.dashboardStats.siteStatus?.newslettersEnabled;
}
}