diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-03-27 12:49:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 12:49:33 +0200 |
commit | cbdb25ab0343603165fc89fd28b07c9ca0f2ae6d (patch) | |
tree | dc8aa1aa2449f54b530df0b251f7d126df0e525f /app/javascript/flavours/glitch/features/compose/components/options.jsx | |
parent | 81e85782d1cf595310180c3106ed92682045b5fd (diff) | |
parent | 8215df76c070f7d400a6091fcb1c0f6ff78474a0 (diff) |
Merge pull request #2151 from ClearlyClaire/glitch-soc/main
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components/options.jsx')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/options.jsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/options.jsx b/app/javascript/flavours/glitch/features/compose/components/options.jsx index e09e13bcb..19ead2f21 100644 --- a/app/javascript/flavours/glitch/features/compose/components/options.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/options.jsx @@ -83,8 +83,11 @@ const messages = defineMessages({ }, }); -@connect((state, { name }) => ({ checked: state.getIn(['compose', 'advanced_options', name]) })) -class ToggleOption extends ImmutablePureComponent { +const mapStateToProps = (state, { name }) => ({ + checked: state.getIn(['compose', 'advanced_options', name]), +}); + +class ToggleOptionImpl extends ImmutablePureComponent { static propTypes = { name: PropTypes.string.isRequired, @@ -113,7 +116,8 @@ class ToggleOption extends ImmutablePureComponent { } -export default @injectIntl +const ToggleOption = connect(mapStateToProps)(ToggleOptionImpl); + class ComposerOptions extends ImmutablePureComponent { static propTypes = { @@ -315,3 +319,5 @@ class ComposerOptions extends ImmutablePureComponent { } } + +export default injectIntl(ComposerOptions); |