diff --git a/scm-ui/src/repos/sources/containers/Content.js b/scm-ui/src/repos/sources/containers/Content.js index 3e6ce183cf..0b764aa6a1 100644 --- a/scm-ui/src/repos/sources/containers/Content.js +++ b/scm-ui/src/repos/sources/containers/Content.js @@ -34,7 +34,7 @@ type State = { language: string, loaded: boolean, collapsed: boolean, - error?: Error, + error?: Error }; const styles = { @@ -129,20 +129,20 @@ class Content extends React.Component { - - + + - - + + - - + + - - + +
Path{file.path}Path{file.path}
Branch{revision}Branch{revision}
Last modified{date}Last modified{date}
Description{description}Description{description}
@@ -154,12 +154,13 @@ class Content extends React.Component { showContent() { const { file, revision } = this.props; - const contentType = this.state.contentType; - const language = this.state.language; + const { contentType, language } = this.state; if (contentType.startsWith("image/")) { return ; } else if (language) { return ; + } else if (contentType.startsWith("text/")) { + return ; } else { return ( { render() { const { file, classes } = this.props; - const error = this.state.error; - const loaded = this.state.loaded; + const { loaded, error } = this.state; if (!file || !loaded) { return ; @@ -202,7 +202,6 @@ class Content extends React.Component { } } - const mapStateToProps = (state: any, ownProps: Props) => { const { repository, revision, path } = ownProps;