mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 19:48:50 +03:00
Removed unnecessary <GhMembersListItem> backing class
no issue - `ember-moment` provides the `{{moment-from-now}}` helper that does the same thing the `.memberSince` computed property was doing
This commit is contained in:
parent
dd00161a0c
commit
e5ef8bad9b
@ -31,7 +31,7 @@
|
||||
|
||||
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data gh-members-list-subscribed-at gh-list-cellwidth-20 nowrap middarkgrey f8 {{if (not @member.name) "gh-members-subscribed-noname"}}">
|
||||
{{#if @member.createdAtUTC}}
|
||||
{{moment-format @member.createdAtUTC "MMM DD, YYYY"}} <span class="midlightgrey">({{this.memberSince}})</span>
|
||||
{{moment-format @member.createdAtUTC "MMM DD, YYYY"}} <span class="midlightgrey">({{moment-from-now @member.createdAtUTC}})</span>
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
import Component from '@glimmer/component';
|
||||
import moment from 'moment';
|
||||
|
||||
export default class GhMembersListItemComponent extends Component {
|
||||
get memberSince() {
|
||||
// member can be a proxy in a sparse array so .get is required
|
||||
let createdAt = this.args.member.get('createdAtUTC');
|
||||
if (createdAt) {
|
||||
return moment(createdAt).from(moment());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user