// @flow
import React from "react";
import { translate } from "react-i18next";
import type { File } from "@scm-manager/ui-types";

type Props = {
  t: string => string,
  file: File
};

class ImageViewer extends React.Component<Props> {
  render() {
    const { file } = this.props;
    return (
      <div className="has-text-centered">
        <figure>
          <img src={file._links.self.href} alt={file._links.self.href} />
        </figure>
      </div>
    );
  }
}

export default translate("repos")(ImageViewer);
