mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-19 22:04:56 -04:00
41 lines
945 B
JavaScript
41 lines
945 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React, { Component } from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { createSelector } from 'reselect';
|
|
import createIndexerSelector from 'Store/Selectors/createIndexerSelector';
|
|
import IndexerInfoModalContent from './IndexerInfoModalContent';
|
|
|
|
function createMapStateToProps() {
|
|
return createSelector(
|
|
(state) => state.settings.advancedSettings,
|
|
createIndexerSelector(),
|
|
(advancedSettings, indexer) => {
|
|
return {
|
|
advancedSettings,
|
|
...indexer
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|
|
class IndexerInfoModalContentConnector extends Component {
|
|
|
|
//
|
|
// Render
|
|
|
|
render() {
|
|
return (
|
|
<IndexerInfoModalContent
|
|
{...this.props}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
IndexerInfoModalContentConnector.propTypes = {
|
|
indexerId: PropTypes.number,
|
|
onModalClose: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default connect(createMapStateToProps)(IndexerInfoModalContentConnector);
|