From e5ef8bad9b8444f673c4664443d9b4ab2a9f0ebc Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Thu, 28 May 2020 12:29:31 +0100 Subject: [PATCH] Removed unnecessary backing class no issue - `ember-moment` provides the `{{moment-from-now}}` helper that does the same thing the `.memberSince` computed property was doing --- ghost/admin/app/components/gh-members-list-item.hbs | 2 +- ghost/admin/app/components/gh-members-list-item.js | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 ghost/admin/app/components/gh-members-list-item.js diff --git a/ghost/admin/app/components/gh-members-list-item.hbs b/ghost/admin/app/components/gh-members-list-item.hbs index b3ddff3ca6..6ab445b814 100644 --- a/ghost/admin/app/components/gh-members-list-item.hbs +++ b/ghost/admin/app/components/gh-members-list-item.hbs @@ -31,7 +31,7 @@ {{#if @member.createdAtUTC}} - {{moment-format @member.createdAtUTC "MMM DD, YYYY"}} ({{this.memberSince}}) + {{moment-format @member.createdAtUTC "MMM DD, YYYY"}} ({{moment-from-now @member.createdAtUTC}}) {{/if}} diff --git a/ghost/admin/app/components/gh-members-list-item.js b/ghost/admin/app/components/gh-members-list-item.js deleted file mode 100644 index cf05ad3dfc..0000000000 --- a/ghost/admin/app/components/gh-members-list-item.js +++ /dev/null @@ -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; - } -}