import { h } from 'preact'; import PropTypes from 'prop-types'; const Channels = ({ activeChannelId, chatChannels, handleSwitchChannel }) => { const channels = chatChannels.map(channel => { const otherClassname = parseInt(activeChannelId, 10) === channel.id ? 'chatchanneltab--active' : 'chatchanneltab--inactive'; return ( ); }); return (