import React, { PropTypes } from "react" export default class AuthorizeBtn extends React.Component { static propTypes = { className: PropTypes.string } onClick =() => { let { authActions, authSelectors } = this.props let definitions = authSelectors.definitionsToAuthorize() authActions.showDefinitions(definitions) } render() { let { authSelectors, getComponent } = this.props //must be moved out of button component const AuthorizationPopup = getComponent("authorizationPopup", true) let showPopup = !!authSelectors.shownDefinitions() let isAuthorized = !!authSelectors.authorized().size return (