mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
01249926d5
refs https://github.com/TryGhost/Team/issues/1986 - hides referrer source on member details page if its `Created manually` as its not useful
16 lines
499 B
JavaScript
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);
|
|
}
|
|
}
|