{"size": 745, "ext": "js", "max_stars_repo_path": "src/components/widgets/Version/Version.js", "max_stars_repo_name": "exyi/web-app", "max_stars_repo_stars_event_min_datetime": "2017-09-28T09:30:09.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-14T19:22:27.000Z", "max_issues_repo_path": "src/components/widgets/Version/Version.js", "max_issues_repo_name": "exyi/web-app", "max_issues_repo_issues_event_min_datetime": "2017-04-24T12:10:23.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-22T13:05:35.000Z", "max_forks_repo_path": "src/components/widgets/Version/Version.js", "max_forks_repo_name": "exyi/web-app", "max_forks_repo_forks_event_min_datetime": "2017-10-04T19:08:09.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-08T20:01:40.000Z"}
{"max_stars_count": 9, "max_issues_count": 66, "max_forks_count": 6, "avg_line_length": 27.5925925926, "max_line_length": 85, "alphanum_fraction": 0.6765100671}
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedNumber, FormattedMessage } from 'react-intl';
import DateTime from '../DateTime';

const Version = ({ version, createdAt, updatedAt }) => (
  <span>
    <span className="em-padding-right">
      v<FormattedNumber value={version} />
    </span>
    {updatedAt !== createdAt && (
      <small className="text-muted">
        <FormattedMessage id="generic.lastUpdatedAt" defaultMessage="updated" />{' '}
        <DateTime unixts={updatedAt} showRelative />
      </small>
    )}
  </span>
);

Version.propTypes = {
  version: PropTypes.number.isRequired,
  createdAt: PropTypes.number.isRequired,
  updatedAt: PropTypes.number.isRequired,
};

export default Version;
