You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
755 B
32 lines
755 B
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { createSelector } from 'reselect';
|
|
import createQualityProfileSelector from 'Store/Selectors/createQualityProfileSelector';
|
|
|
|
function createMapStateToProps() {
|
|
return createSelector(
|
|
createQualityProfileSelector(),
|
|
(qualityProfile) => {
|
|
return {
|
|
name: qualityProfile.name
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|
|
function QualityProfileNameConnector({ name, ...otherProps }) {
|
|
return (
|
|
<span>
|
|
{name}
|
|
</span>
|
|
);
|
|
}
|
|
|
|
QualityProfileNameConnector.propTypes = {
|
|
qualityProfileId: PropTypes.number.isRequired,
|
|
name: PropTypes.string.isRequired
|
|
};
|
|
|
|
export default connect(createMapStateToProps)(QualityProfileNameConnector);
|