UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

15 lines (13 loc) 492 B
import { PusherMetadataModel } from '../interfaces' import { RootState, PusherMetadataState, PUSHER_REDUCER_KEY, PUSHER_METADATA_REDUCER_KEY, } from '../reducers' export const getMetadataState = (state: RootState): PusherMetadataState => state[PUSHER_REDUCER_KEY][PUSHER_METADATA_REDUCER_KEY] export const getMetadataByChannel = (state: RootState, channel: string): PusherMetadataModel | null => getMetadataState(state)[channel] || null