2022-10-27 07:33:11 +00:00
|
|
|
import { IStateful } from '../base/app/types';
|
|
|
|
import { toState } from '../base/redux/functions';
|
2020-04-30 21:25:34 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if follow me is active and false otherwise.
|
|
|
|
*
|
|
|
|
* @param {Object|Function} stateful - Object or function that can be resolved
|
|
|
|
* to the Redux state.
|
|
|
|
* @returns {boolean} - True if follow me is active and false otherwise.
|
|
|
|
*/
|
2022-10-27 07:33:11 +00:00
|
|
|
export function isFollowMeActive(stateful: IStateful) {
|
2020-04-30 21:25:34 +00:00
|
|
|
const state = toState(stateful);
|
|
|
|
|
|
|
|
return Boolean(state['features/follow-me'].moderator);
|
|
|
|
}
|