You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Global-sales/src/views/Conversations/Online/Components/ChannelLogo.jsx

24 lines
841 B
React

import React, { } from 'react';
import { WhatsAppOutlined, MailOutlined } from '@ant-design/icons';
import { WABIcon, } from '@/components/Icons';
const ChannelLogo = ({channel}) => {
// if is array, get last
if (Array.isArray(channel)) {
channel = channel[channel.length - 1];
}
const _channel = (channel || '').toLowerCase();
10 months ago
switch (_channel) {
case 'waba':
return <WABIcon key={channel} className='text-whatsapp' />;
case 'wa':
return <WhatsAppOutlined key={channel} className='text-whatsapp' />;
case 'email':
return <MailOutlined key={channel} className='text-indigo-500' />
default:
// return <MailOutlined key={'channel'} className='text-indigo-500' />
return <WABIcon key={channel} className='text-whatsapp' />;
}
}
export default ChannelLogo;