Skip to content
Snippets Groups Projects
Unverified Commit ece865d9 authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Merge pull request #1651 from ProjectMirador/1650-shortFragmentSyntax

use short Fragment Syntax
parents 497dcc40 5028c440
No related branches found
No related tags found
No related merge requests found
import React, { Component, Fragment } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import OpenSeadragon from 'openseadragon'; import OpenSeadragon from 'openseadragon';
import miradorWithPlugins from '../lib/miradorWithPlugins'; import miradorWithPlugins from '../lib/miradorWithPlugins';
...@@ -70,13 +70,13 @@ export class OpenSeadragonViewer extends Component { ...@@ -70,13 +70,13 @@ export class OpenSeadragonViewer extends Component {
render() { render() {
const { window } = this.props; const { window } = this.props;
return ( return (
<Fragment> <>
<div <div
className={ns('osd-container')} className={ns('osd-container')}
id={`${window.id}-osd`} id={`${window.id}-osd`}
ref={this.ref} ref={this.ref}
/> />
</Fragment> </>
); );
} }
} }
......
import React, { Component, Fragment } from 'react'; import React, { Component } from 'react';
import miradorWithPlugins from '../lib/miradorWithPlugins'; import miradorWithPlugins from '../lib/miradorWithPlugins';
/** /**
* *
*/ */
...@@ -10,9 +11,7 @@ export class WindowTopBarButtons extends Component { ...@@ -10,9 +11,7 @@ export class WindowTopBarButtons extends Component {
* @return {type} description * @return {type} description
*/ */
render() { render() {
return ( return (<></>);
<Fragment />
);
} }
} }
......
import React, { Component, Fragment } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { actions } from '../store'; import { actions } from '../store';
...@@ -80,13 +80,13 @@ class WindowViewer extends Component { ...@@ -80,13 +80,13 @@ class WindowViewer extends Component {
render() { render() {
const { window } = this.props; const { window } = this.props;
return ( return (
<Fragment> <>
<ConnectedOSDViewer <ConnectedOSDViewer
tileSources={this.tileInfoFetchedFromStore()} tileSources={this.tileInfoFetchedFromStore()}
window={window} window={window}
/> />
<ConnectedViewerNavigation window={window} canvases={this.canvases} /> <ConnectedViewerNavigation window={window} canvases={this.canvases} />
</Fragment> </>
); );
} }
} }
......
import React, { Component, Fragment } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import componentPlugins from './componentPlugins'; import componentPlugins from './componentPlugins';
...@@ -34,7 +34,7 @@ export default function miradorWithPlugins(WrappedComponent) { ...@@ -34,7 +34,7 @@ export default function miradorWithPlugins(WrappedComponent) {
const { config } = this.props; const { config } = this.props;
const { plugins } = config; const { plugins } = config;
return ( return (
<Fragment> <>
<WrappedComponent {...this.props} ref={(parent) => { this.pluginParent = parent; }} /> <WrappedComponent {...this.props} ref={(parent) => { this.pluginParent = parent; }} />
{ /* TODO: Refactor .name here in some way so we dont need to rely on it */} { /* TODO: Refactor .name here in some way so we dont need to rely on it */}
{componentPlugins(WrappedComponent.name, plugins) {componentPlugins(WrappedComponent.name, plugins)
...@@ -43,7 +43,7 @@ export default function miradorWithPlugins(WrappedComponent) { ...@@ -43,7 +43,7 @@ export default function miradorWithPlugins(WrappedComponent) {
{ key: component.name, ...this.props, pluginParent: this.getPluginParent }, { key: component.name, ...this.props, pluginParent: this.getPluginParent },
)) ))
} }
</Fragment> </>
); );
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment