/** * WordPress dependencies */ import { useSelect, useDispatch } from '@safe-wordpress/data'; import { _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import { uniq, without } from 'lodash'; import { AuthorSearcher } from '@nelio-content/components'; import type { AuthorId } from '@nelio-content/types'; /** * Internal dependencies */ import { Follower } from './follower'; import { store as NC_EDIT_POST } from '../../store'; export const Notifications = (): JSX.Element => { const [ followers, setFollowers ] = useFollowers(); const authorId = useAuthorId(); const shouldAuthorFollow = useShouldAuthorFollow(); const addFollower = ( followerId: AuthorId ) => setFollowers( uniq( [ ...followers, followerId ] ) ); const removeFollower = ( followerId: AuthorId ) => setFollowers( without( followers, followerId ) ); return (