import React from 'react';
import PropTypes from 'prop-types';
import UserDate from '../User/UserDate';
import Username from '../User/Username';
import UserPicture from '../User/UserPicture';
export default class Revision extends React.Component {
constructor(props) {
super(props);
this._onDiffOpenClicked = this._onDiffOpenClicked.bind(this);
}
componentDidMount() {
}
_onDiffOpenClicked() {
this.props.onDiffOpenClicked(this.props.revision);
}
renderSimplifiedNodiff(revision) {
const { t } = this.props;
const author = revision.author;
let pic = '';
if (typeof author === 'object') {
pic =
{ !this.props.hasDiff && { t('No diff') } } { this.props.hasDiff && ( { t('View diff') } ) } { t('Go to this version') }