diff --git a/app/soapbox/components/sub_navigation.js b/app/soapbox/components/sub_navigation.js index abaceedfa..063448b5c 100644 --- a/app/soapbox/components/sub_navigation.js +++ b/app/soapbox/components/sub_navigation.js @@ -73,9 +73,9 @@ class SubNavigation extends React.PureComponent { handleScroll = throttle(() => { if (this.node) { - const { top } = this.node.getBoundingClientRect(); + const { offsetTop } = this.node; - if (top <= 50) { + if (offsetTop > 0) { this.setState({ scrolled: true }); } else { this.setState({ scrolled: false }); diff --git a/app/soapbox/features/account_timeline/components/column_settings.js b/app/soapbox/features/account_timeline/components/column_settings.js index 7836c01f0..130cb47db 100644 --- a/app/soapbox/features/account_timeline/components/column_settings.js +++ b/app/soapbox/features/account_timeline/components/column_settings.js @@ -1,38 +1,59 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { injectIntl, FormattedMessage } from 'react-intl'; +import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; +import IconButton from 'soapbox/components/icon_button'; import SettingToggle from '../../notifications/components/setting_toggle'; +const messages = defineMessages({ + close: { id: 'lightbox.close', defaultMessage: 'Close' }, +}); + export default @injectIntl class ColumnSettings extends React.PureComponent { static propTypes = { + intl: PropTypes.object.isRequired, settings: ImmutablePropTypes.map.isRequired, onChange: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired, + onClose: PropTypes.func.isRequired, }; render() { - const { settings, onChange } = this.props; + const { intl, settings, onChange, onClose } = this.props; return ( -