UNPKG

mattermost-redux

Version:

Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client

19 lines (18 loc) 740 B
"use strict"; // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. Object.defineProperty(exports, "__esModule", { value: true }); exports.getChannelBookmark = exports.getChannelBookmarks = void 0; const EMPTY_BOOKMARKS = {}; const getChannelBookmarks = (state, channelId) => { const bookmarks = state.entities.channelBookmarks.byChannelId[channelId]; if (!bookmarks) { return EMPTY_BOOKMARKS; } return bookmarks; }; exports.getChannelBookmarks = getChannelBookmarks; const getChannelBookmark = (state, channelId, bookmarkId) => { return (0, exports.getChannelBookmarks)(state, channelId)[bookmarkId]; }; exports.getChannelBookmark = getChannelBookmark;