]> Untitled Git - lemmy.git/blobdiff - ui/src/components/moment-time.tsx
routes.api: fix get_captcha endpoint (#1135)
[lemmy.git] / ui / src / components / moment-time.tsx
index 24ab2d8973074c7ff5122121cf20b5fc1618bd82..e3fa0de31bf76ff6b8cad2cf6461e91f742ac5bd 100644 (file)
@@ -9,6 +9,7 @@ interface MomentTimeProps {
     when_?: string;
     updated?: string;
   };
+  showAgo?: boolean;
 }
 
 export class MomentTime extends Component<MomentTimeProps, any> {
@@ -32,7 +33,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
           <svg class="icon icon-inline mr-1">
             <use xlinkHref="#icon-edit-2"></use>
           </svg>
-          {moment.utc(this.props.data.updated).fromNow(true)}
+          {moment.utc(this.props.data.updated).fromNow(!this.props.showAgo)}
         </span>
       );
     } else {
@@ -42,7 +43,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
           className="pointer unselectable"
           data-tippy-content={this.format(str)}
         >
-          {moment.utc(str).fromNow(true)}
+          {moment.utc(str).fromNow(!this.props.showAgo)}
         </span>
       );
     }