Ghost/ghost/admin/app/components/gh-member-details.js
Rishabh 01249926d5 Refined attribution data on member details page
refs https://github.com/TryGhost/Team/issues/1986

- hides referrer source on member details page if its `Created manually` as its not useful
2022-10-03 18:58:48 +05:30

16 lines
499 B
JavaScript

import Component from '@glimmer/component';
import {inject as service} from '@ember/service';
export default class extends Component {
@service settings;
get referrerSource() {
const source = this.args.member.get('attribution')?.referrer_source;
return source === 'Created manually' ? null : source;
}
get showAttribution() {
return this.referrerSource || (this.args.member?.get('attribution')?.url && this.args.member?.get('attribution')?.title);
}
}