Handled empty attribution section on member detail page

refs https://github.com/TryGhost/Team/issues/1986

- hides attribution section if there is no source and page/post attribution
This commit is contained in:
Rishabh 2022-10-03 14:58:00 +05:30
parent 6dc5f7ebb0
commit e57502e02f
2 changed files with 5 additions and 1 deletions

View File

@ -64,7 +64,7 @@
{{/if}}
</p>
</div>
{{#if (and (feature 'sourceAttribution') @member.attribution)}}
{{#if (and (feature 'sourceAttribution') this.showAttribution)}}
<div class="gh-member-details-attribution">
<h4 class="gh-main-section-header small bn">Attribution</h4>
{{#if this.referrerSource}}

View File

@ -7,4 +7,8 @@ export default class extends Component {
get referrerSource() {
return this.args.member.get('attribution')?.referrer_source;
}
get showAttribution() {
return this.referrerSource || (this.args.member?.attribution?.url && this.args.member?.attribution?.title);
}
}