import React from 'react'; import PropTypes from 'prop-types'; import { gettext } from '../../utils/constants'; const { err } = window.app.pageOptions; const propTypes = { errorMsg: PropTypes.string }; class FileViewTip extends React.Component { render() { let errorMsg; if (err == 'File preview unsupported') { errorMsg =
{gettext('Online view is not applicable to this file format')}
; } else { errorMsg ={err || this.props.errorMsg}
; } return (