2020-03-27 13:59:38 -07:00
import React from 'react' ;
import PropTypes from 'prop-types' ;
import ImmutablePropTypes from 'react-immutable-proptypes' ;
import { injectIntl , FormattedMessage } from 'react-intl' ;
import SettingToggle from '../../notifications/components/setting_toggle' ;
export default @ injectIntl
class ColumnSettings extends React . PureComponent {
static propTypes = {
settings : ImmutablePropTypes . map . isRequired ,
onChange : PropTypes . func . isRequired ,
intl : PropTypes . object . isRequired ,
} ;
2020-04-14 14:47:35 -07:00
render ( ) {
2020-03-27 13:59:38 -07:00
const { settings , onChange } = this . props ;
return (
< div >
< div className = 'column-settings__row' >
< SettingToggle prefix = 'home_timeline' settings = { settings } settingPath = { [ 'shows' , 'reblog' ] } onChange = { onChange } label = { < FormattedMessage id = 'home.column_settings.show_reblogs' defaultMessage = 'Show reposts' / > } / >
< / d i v >
< div className = 'column-settings__row' >
< SettingToggle prefix = 'home_timeline' settings = { settings } settingPath = { [ 'shows' , 'reply' ] } onChange = { onChange } label = { < FormattedMessage id = 'home.column_settings.show_replies' defaultMessage = 'Show replies' / > } / >
< / d i v >
2020-08-07 18:47:04 -07:00
< div className = 'column-settings__row' >
< SettingToggle prefix = 'home_timeline' settings = { settings } settingPath = { [ 'shows' , 'direct' ] } onChange = { onChange } label = { < FormattedMessage id = 'home.column_settings.show_direct' defaultMessage = 'Show direct messages' / > } / >
< / d i v >
2020-03-27 13:59:38 -07:00
< / d i v >
) ;
}
}