render()

in frontend/src/js/components/viewer/PreviewSwitcher.js [96:110]


    render() {
        const current = this.props.view ? this.props.view : this.props.resource.transcript ? 'transcript' : 'text';

        const {parents} = this.props.resource;

        return <nav className='preview__links'>
            <KeyboardShortcut shortcut={keyboardShortcuts.showText} func={this.showText} />
            <KeyboardShortcut shortcut={keyboardShortcuts.showPreview} func={this.showPreview} />
            {this.props.resource.text && !this.props.resource.transcript ? <PreviewLink current={current} text='Text' to='text' navigate={this.props.setResourceView} />    : false}
            {this.props.resource.transcript  ? this.renderMultiLangLinks(current, 'transcript', 'Transcript')    : false}
            {!this.props.resource.transcript && this.renderMultiLangLinks(current, 'ocr', 'OCR')}
            {this.canPreview(this.props.resource.previewStatus) ? <PreviewLink current={current} text='Preview' to='preview' navigate={this.props.setResourceView} /> : false}
            {parents && parents.some(m => m.uri.endsWith("csv") || m.uri.endsWith("tsv")) && <PreviewLink current={current} text="Table" to="table" navigate={this.props.setResourceView} /> }
        </nav>;
    }