diff options
author | Dessalines <tyhou13@gmx.com> | 2019-04-15 16:12:06 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-04-15 16:12:06 -0700 |
commit | e94885eb97b3240ed9cec7f97d0f405b2819e922 (patch) | |
tree | b407f0b6ed9be27682e3767271e34933c947cb2a /ui/src/components/moment-time.tsx | |
parent | 8590a612f633fe6ba8f8b18379a8a822a3b3019b (diff) |
Commiting before I lose everything. I'll do this properly in a merge
Diffstat (limited to 'ui/src/components/moment-time.tsx')
-rw-r--r-- | ui/src/components/moment-time.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx index b7402e7e..c8826695 100644 --- a/ui/src/components/moment-time.tsx +++ b/ui/src/components/moment-time.tsx @@ -3,7 +3,8 @@ import * as moment from 'moment'; interface MomentTimeProps { data: { - published: string; + published?: string; + when_?: string; updated?: string; } } @@ -20,8 +21,9 @@ export class MomentTime extends Component<MomentTimeProps, any> { <span title={this.props.data.updated} className="font-italics">modified {moment.utc(this.props.data.updated).fromNow()}</span> ) } else { + let str = this.props.data.published || this.props.data.when_; return ( - <span title={this.props.data.published}>{moment.utc(this.props.data.published).fromNow()}</span> + <span title={str}>{moment.utc(str).fromNow()}</span> ) } } |