diff --git a/app/javascript/mastodon/features/closed_registrations_modal/index.jsx b/app/javascript/mastodon/features/closed_registrations_modal/index.jsx index 89ced8029c..244be5916a 100644 --- a/app/javascript/mastodon/features/closed_registrations_modal/index.jsx +++ b/app/javascript/mastodon/features/closed_registrations_modal/index.jsx @@ -7,7 +7,7 @@ import { fetchServer } from 'mastodon/actions/server'; import { domain } from 'mastodon/initial_state'; const mapStateToProps = state => ({ - message: state.getIn(['server', 'server', 'registrations', 'message']), + message: state.getIn(['server', 'server', 'item', 'registrations', 'message']), }); class ClosedRegistrationsModal extends ImmutablePureComponent { diff --git a/app/javascript/mastodon/features/report/category.jsx b/app/javascript/mastodon/features/report/category.jsx index 7a37426a65..4c3a7d6a3b 100644 --- a/app/javascript/mastodon/features/report/category.jsx +++ b/app/javascript/mastodon/features/report/category.jsx @@ -28,14 +28,14 @@ const messages = defineMessages({ }); const mapStateToProps = state => ({ - rules: state.getIn(['server', 'server', 'rules'], ImmutableList()), + rules: state.getIn(['server', 'server', 'item', 'rules'], []), }); class Category extends PureComponent { static propTypes = { onNextStep: PropTypes.func.isRequired, - rules: ImmutablePropTypes.list, + rules: PropTypes.arrayOf(PropTypes.object), category: PropTypes.string, onChangeCategory: PropTypes.func.isRequired, startedFrom: PropTypes.oneOf(['status', 'account']), @@ -69,7 +69,7 @@ class Category extends PureComponent { render () { const { category, startedFrom, rules, intl } = this.props; - const options = rules.size > 0 ? [ + const options = rules.length > 0 ? [ 'dislike', 'spam', 'legal', diff --git a/app/javascript/mastodon/features/report/rules.jsx b/app/javascript/mastodon/features/report/rules.jsx index 33087e3d62..765bef7c6c 100644 --- a/app/javascript/mastodon/features/report/rules.jsx +++ b/app/javascript/mastodon/features/report/rules.jsx @@ -11,7 +11,7 @@ import { Button } from 'mastodon/components/button'; import Option from './components/option'; const mapStateToProps = state => ({ - rules: state.getIn(['server', 'server', 'rules']), + rules: state.getIn(['server', 'server', 'item', 'rules']), locale: state.getIn(['meta', 'locale']), }); @@ -19,7 +19,7 @@ class Rules extends PureComponent { static propTypes = { onNextStep: PropTypes.func.isRequired, - rules: ImmutablePropTypes.list, + rules: PropTypes.arrayOf(PropTypes.object), locale: PropTypes.string, selectedRuleIds: ImmutablePropTypes.set.isRequired, onToggle: PropTypes.func.isRequired, @@ -46,12 +46,12 @@ class Rules extends PureComponent {