mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
b5db0d57d9
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
19 lines
508 B
JavaScript
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;
|
|
}
|
|
}
|