UNPKG

stream-chat-react-native-core

Version:

The official React Native and Expo components for Stream Chat, a service for building chat applications

23 lines 741 B
Object.defineProperty(exports, "__esModule", { value: true }); exports.useChannelActionItemsById = void 0; var _react = require("react"); var _useChannelActionItems = require("./useChannelActionItems"); var useChannelActionItemsById = ({ channel, surface, getChannelActionItems }) => { var channelActionItems = (0, _useChannelActionItems.useChannelActionItems)({ channel, getChannelActionItems, surface }); return (0, _react.useMemo)(() => channelActionItems.reduce((acc, channelActionItem) => { acc[channelActionItem.id] = channelActionItem; return acc; }, {}), [channelActionItems]); }; exports.useChannelActionItemsById = useChannelActionItemsById; //# sourceMappingURL=useChannelActionItemsById.js.map