show image

This commit is contained in:
Maren Süwer
2018-10-29 10:46:16 +01:00
parent 866409c8df
commit abad7d905c
3 changed files with 14 additions and 21 deletions

View File

@@ -6,9 +6,7 @@ import { DownloadButton } from "@scm-manager/ui-components";
type Props = {
t: string => string,
file: File,
revision: string,
classes: any
file: File
};
class DownloadViewer extends React.Component<Props> {

View File

@@ -1,28 +1,23 @@
// @flow
import React from "react";
import { translate } from "react-i18next";
import type { File } from "@scm-manager/ui-types";
type Props = {
t: string => string
t: string => string,
file: File
};
type State = {
content: string
};
class ImageViewer extends React.Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = {
content: ""
};
}
componentDidMount() {}
class ImageViewer extends React.Component<Props> {
render() {
return "ImageViewer";
const { file } = this.props;
return (
<div className="has-text-centered">
<figure>
<img src={file._links.self.href} />
</figure>
</div>
);
}
}