Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (currentContact && currentContact.id) {
// const contactId = currentContact.id;
const activityCardId = sessionId ? `${currentContact.id}-${sessionId}` : currentContact.id;
if (recentMessages.messages[activityCardId]) {
messages = recentMessages.messages[activityCardId];
}
if (recentCalls.calls[activityCardId]) {
calls = recentCalls.calls[activityCardId];
}
if (recentMessages.unreadMessageCounts[activityCardId]) {
unreadMessageCounts = recentMessages.unreadMessageCounts[activityCardId];
}
}
const tabs = [
{
icon: <span>,
label: i18n.getString('call', currentLocale),
path: 'recentCalls',
isActive: path => path === 'recentCalls',
view: (
),
getData: () => {
recentCalls.getCalls({ currentContact, sessionId });
},
cleanUp: () => recentCalls.cleanUpCalls({ contact: currentContact, sessionId })
},</span>