Ghost/ghost/admin/app/components/dashboard/latest-member-activity.js
Kevin Ansfield b5db0d57d9 Updated dashboard member activity widget to use fetcher resource
refs https://github.com/TryGhost/Team/issues/1277

- re-uses same fetcher resource used on member activities screen
  - allows for component to be simplified as it no longer needs to care about handling data loading itself
  - drops use of 1-minute data caching as there is no real need for it in typical usage and can be confusing when the dashboard didn't update as expected
- exposed error message on `members-event-fetcher` if one is encountered
2022-01-22 16:04:54 +00:00

19 lines
508 B
JavaScript

import Component from '@glimmer/component';
import {inject as service} from '@ember/service';
export default class DashboardLatestMemberActivityComponent extends Component {
@service session;
@service settings;
get shouldDisplay() {
const isOwner = this.session.user?.isOwnerOnly;
const hasCompletedLaunchWizard = this.settings.get('editorIsLaunchComplete');
if (isOwner && !hasCompletedLaunchWizard) {
return false;
}
return true;
}
}