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
This commit is contained in:
Rishabh 2022-10-03 18:58:48 +05:30
parent c48df76d9b
commit 01249926d5

View File

@ -5,10 +5,11 @@ export default class extends Component {
@service settings;
get referrerSource() {
return this.args.member.get('attribution')?.referrer_source;
const source = this.args.member.get('attribution')?.referrer_source;
return source === 'Created manually' ? null : source;
}
get showAttribution() {
return this.referrerSource || (this.args.member?.attribution?.url && this.args.member?.attribution?.title);
return this.referrerSource || (this.args.member?.get('attribution')?.url && this.args.member?.get('attribution')?.title);
}
}