import PropTypes from 'prop-types'; import { useRef, useCallback, useEffect } from 'react'; import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import { Helmet } from 'react-helmet'; import { useSelector, useDispatch } from 'react-redux'; import InventoryIcon from '@/material-icons/400-24px/inventory_2.svg?react'; import { fetchNotificationRequests, expandNotificationRequests } from 'mastodon/actions/notifications'; import { changeSetting } from 'mastodon/actions/settings'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; import ScrollableList from 'mastodon/components/scrollable_list'; import { NotificationRequest } from './components/notification_request'; import { PolicyControls } from './components/policy_controls'; import SettingToggle from './components/setting_toggle'; const messages = defineMessages({ title: { id: 'notification_requests.title', defaultMessage: 'Filtered notifications' }, maximize: { id: 'notification_requests.maximize', defaultMessage: 'Maximize' } }); const ColumnSettings = () => { const dispatch = useDispatch(); const settings = useSelector((state) => state.settings.get('notifications')); const onChange = useCallback( (key, checked) => { dispatch(changeSetting(['notifications', ...key], checked)); }, [dispatch], ); return (