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