import React from 'react'; import { connect } from 'react-redux'; import * as TemplateSyncActions from './NewTemplateSyncActions'; import NewTemplateSync from './NewTemplateSync'; import { selectLoadingSettings, selectError } from './NewTemplateSyncSelectors'; import withProtectedView from '../../withProtectedView'; import PermissionDenied from '../PermissionDenied'; const mapStateToProps = state => ({ loadingSettings: selectLoadingSettings(state), error: selectError(state), }); const permissionList = ( ); export default withProtectedView( connect( mapStateToProps, TemplateSyncActions )(NewTemplateSync), PermissionDenied, props => props.userPermissions && (props.userPermissions.import || props.userPermissions.export), { doc: permissionList } );