diff --git a/app/javascript/mastodon/features/home_timeline/components/column_settings.js b/app/javascript/mastodon/features/home_timeline/components/column_settings.js index 104d8ff3745..ba870a36016 100644 --- a/app/javascript/mastodon/features/home_timeline/components/column_settings.js +++ b/app/javascript/mastodon/features/home_timeline/components/column_settings.js @@ -28,17 +28,17 @@ class ColumnSettings extends React.PureComponent {
- } /> + } />
- } /> + } />
- +
); diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.js b/app/javascript/mastodon/features/notifications/components/column_settings.js index 7bfd02f1168..13ac7882630 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.js +++ b/app/javascript/mastodon/features/notifications/components/column_settings.js @@ -31,33 +31,33 @@ class ColumnSettings extends React.PureComponent {
- - - + + +
- - - + + +
- - - + + +
- - - + + +
); diff --git a/app/javascript/mastodon/features/notifications/components/setting_toggle.js b/app/javascript/mastodon/features/notifications/components/setting_toggle.js index a37abbd9c22..aefc14ee3fd 100644 --- a/app/javascript/mastodon/features/notifications/components/setting_toggle.js +++ b/app/javascript/mastodon/features/notifications/components/setting_toggle.js @@ -6,19 +6,20 @@ import Toggle from 'react-toggle'; class SettingToggle extends React.PureComponent { static propTypes = { + prefix: PropTypes.string, settings: ImmutablePropTypes.map.isRequired, settingKey: PropTypes.array.isRequired, label: PropTypes.node.isRequired, onChange: PropTypes.func.isRequired, } - onChange = (e) => { - this.props.onChange(this.props.settingKey, e.target.checked); + onChange = ({ target }) => { + this.props.onChange(this.props.settingKey, target.checked); } render () { - const { settings, settingKey, label, onChange } = this.props; - const id = `setting-toggle-${settingKey.join('-')}`; + const { prefix, settings, settingKey, label, onChange } = this.props; + const id = ['setting-toggle', prefix, ...settingKey].filter(Boolean).join('-'); return (