From 5418df467d953316838b8eaee1ad90c33b3c15a6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 26 Dec 2016 21:55:52 +0100 Subject: Only display follow requests link in getting started window if account is locked --- .../components/features/getting_started/index.jsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/components/features/getting_started/index.jsx b/app/assets/javascripts/components/features/getting_started/index.jsx index 7c2491954..fdd594621 100644 --- a/app/assets/javascripts/components/features/getting_started/index.jsx +++ b/app/assets/javascripts/components/features/getting_started/index.jsx @@ -3,6 +3,7 @@ import ColumnLink from '../ui/components/column_link'; import { Link } from 'react-router'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; +import ImmutablePropTypes from 'react-immutable-proptypes'; const messages = defineMessages({ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, @@ -12,7 +13,7 @@ const messages = defineMessages({ }); const mapStateToProps = state => ({ - me: state.getIn(['meta', 'me']) + me: state.getIn(['accounts', state.getIn(['meta', 'me'])]) }); const hamburgerStyle = { @@ -27,13 +28,19 @@ const hamburgerStyle = { }; const GettingStarted = ({ intl, me }) => { + let followRequests = ''; + + if (me.get('locked')) { + followRequests = ; + } + return (
- + {followRequests}
@@ -47,7 +54,7 @@ const GettingStarted = ({ intl, me }) => { GettingStarted.propTypes = { intl: React.PropTypes.object.isRequired, - me: React.PropTypes.number + me: ImmutablePropTypes.map.isRequired }; export default connect(mapStateToProps)(injectIntl(GettingStarted)); -- cgit