diff --git a/src/components/pages/Profile.js b/src/components/pages/Profile.js index fead12062bc16afe65e3565bd2cb9b740a80dd63..5f8b3c790774b40c8278f5af956247247c813c4b 100644 --- a/src/components/pages/Profile.js +++ b/src/components/pages/Profile.js @@ -20,7 +20,7 @@ class Profile extends Component { render() { const { - nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id, + role, nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id, } = this.props; return ( <Container @@ -106,14 +106,18 @@ class Profile extends Component { defaultValue={groups} /> <br /> - <Form.Checkbox - name='signed' - label='SzeretnĂŠk jelentkezni a KSZKĂŠpzĂŠsre' - onChange={(_, v) => - this.props.textChange({ target: { name: v.name, value: v.checked } }) - } - checked={signed} - /> + { role === 'Applicant' ? + <Form.Checkbox + name='signed' + label='SzeretnĂŠk jelentkezni a KSZKĂŠpzĂŠsre' + onChange={(_, v) => + this.props.textChange({ target: { name: v.name, value: v.checked } }) + } + checked={signed} + /> + : + null + } <Form.Button primary onClick={() => this.props.submitRegistration({ @@ -130,9 +134,10 @@ class Profile extends Component { const mapStateToProps = ({ user: { - nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id, + role, nick, groups, motivationAbout, motivationProfession, motivationExercise, signed, id, }, }) => ({ + role, nick, groups, motivationAbout,