* create AuthorizeBtnContainer * remove Servers and AuthorizeBtn from Schemes' concern * add AuthorizeBtnContainer to base * strengthen OAS3 definitionsToAuthorize * drop obsolete tests * linter fixes
31 lines
763 B
JavaScript
31 lines
763 B
JavaScript
import React from "react"
|
|
import PropTypes from "prop-types"
|
|
|
|
export default class SchemesContainer extends React.Component {
|
|
|
|
static propTypes = {
|
|
specActions: PropTypes.object.isRequired,
|
|
specSelectors: PropTypes.object.isRequired,
|
|
getComponent: PropTypes.func.isRequired
|
|
}
|
|
|
|
render () {
|
|
const {specActions, specSelectors, getComponent} = this.props
|
|
|
|
const currentScheme = specSelectors.operationScheme()
|
|
const schemes = specSelectors.schemes()
|
|
|
|
const Schemes = getComponent("schemes")
|
|
|
|
const schemesArePresent = schemes && schemes.size
|
|
|
|
return schemesArePresent ? (
|
|
<Schemes
|
|
currentScheme={currentScheme}
|
|
schemes={schemes}
|
|
specActions={specActions}
|
|
/>
|
|
) : null
|
|
}
|
|
}
|