@sendbird/uikit-utils
Version:
A collection of utility functions and constants for building chat UI components with Sendbird UIKit.
17 lines (16 loc) • 640 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getOpenChannelTitle = exports.getOpenChannelParticipants = void 0;
const getOpenChannelTitle = (channel, DEFAULT_CHANNEL_NAME = 'Open Channel') => {
const trimmedChannelName = channel.name.trim();
if (trimmedChannelName === '') return DEFAULT_CHANNEL_NAME;
return trimmedChannelName;
};
exports.getOpenChannelTitle = getOpenChannelTitle;
const getOpenChannelParticipants = channel => {
return `${channel.participantCount} participants`;
};
exports.getOpenChannelParticipants = getOpenChannelParticipants;
//# sourceMappingURL=openChannel.js.map