when_?: string;
updated?: string;
};
+ showAgo?: boolean;
}
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 {
className="pointer unselectable"
data-tippy-content={this.format(str)}
>
- {moment.utc(str).fromNow(true)}
+ {moment.utc(str).fromNow(!this.props.showAgo)}
</span>
);
}
createCommentLikeRes,
createPostLikeFindRes,
commentsToFlatNodes,
+ setupTippy,
} from '../utils';
import { PostListing } from './post-listing';
import { SortSelect } from './sort-select';
</ul>
</h5>
<div>
- {i18n.t('joined')} <MomentTime data={user} />
+ {i18n.t('joined')} <MomentTime data={user} showAgo />
</div>
<div class="table-responsive mt-1">
<table class="table table-bordered table-sm mt-2 mb-0">
document.title = `/u/${this.state.user.name} - ${WebSocketService.Instance.site.name}`;
window.scrollTo(0, 0);
this.setState(this.state);
+ setupTippy();
} else if (res.op == UserOperation.EditComment) {
let data = res.data as CommentResponse;
editCommentRes(data, this.state.comments);