diff --git a/src/components/Buttons/OutlineButton/index.js b/src/components/Buttons/OutlineButton/index.js index 9d5f6914..5bc8140e 100644 --- a/src/components/Buttons/OutlineButton/index.js +++ b/src/components/Buttons/OutlineButton/index.js @@ -22,7 +22,7 @@ const OutlineButton = ({ type, text, link, onClick, url, className, submit, disa if (!_.isEmpty(link)) { return ( - + {text} ) @@ -38,7 +38,7 @@ const OutlineButton = ({ type, text, link, onClick, url, className, submit, disa OutlineButton.propTypes = { type: PropTypes.string.isRequired, text: PropTypes.string.isRequired, - link: PropTypes.string, + link: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), url: PropTypes.string, className: PropTypes.string, onClick: PropTypes.func, diff --git a/src/components/ChallengesComponent/index.js b/src/components/ChallengesComponent/index.js index b9181c20..a110244a 100644 --- a/src/components/ChallengesComponent/index.js +++ b/src/components/ChallengesComponent/index.js @@ -91,6 +91,18 @@ const ChallengesComponent = ({ {activeProject && activeProject.id && !isReadOnly ? (
+ {(checkAdmin(auth.token) || checkManager(auth.token)) && ( + + )} {isAdminOrCopilot && ( { return { @@ -204,20 +214,28 @@ class Users extends Component {
- { - showAddUser && ( -
- this.onAddUserClick()} /> - this.onInviteUserClick()} /> -
- ) - } +
+ { + showAddUser && ( + <> + this.onAddUserClick()} /> + this.onInviteUserClick()} /> + + ) + } + {projectOption && ( + + )} +
{ this.state.showAddUserModal && ( { } Users.propTypes = { + location: PT.object.isRequired, projects: PT.arrayOf(PT.object), resultSearchUserProjects: PT.arrayOf(PT.object), auth: PT.object, @@ -220,4 +232,4 @@ const mapDispatchToProps = { loadNextProjects } -export default connect(mapStateToProps, mapDispatchToProps)(Users) +export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Users))