diff --git a/src/shared/components/common/moment-time.tsx b/src/shared/components/common/moment-time.tsx index 20623932..122fbf7c 100644 --- a/src/shared/components/common/moment-time.tsx +++ b/src/shared/components/common/moment-time.tsx @@ -23,13 +23,27 @@ export class MomentTime extends Component { moment.locale(lang); } + createdAndModifiedTimes() { + let created = this.props.data.published || this.props.data.when_; + return ` +
+
+ ${capitalizeFirstLetter(i18n.t("created"))}: ${this.format(created)} +
+
+ ${capitalizeFirstLetter(i18n.t("modified"))} ${this.format( + this.props.data.updated + )} +
+
`; + } + render() { if (!this.props.ignoreUpdated && this.props.data.updated) { return ( @@ -37,13 +51,13 @@ export class MomentTime extends Component { ); } else { - let str = this.props.data.published || this.props.data.when_; + let created = this.props.data.published || this.props.data.when_; return ( - {moment.utc(str).fromNow(!this.props.showAgo)} + {moment.utc(created).fromNow(!this.props.showAgo)} ); }