import React, { Component } from 'react';
import ApiService from '../../services/ApiService';
import ChannelEntry from './ChannelEntry';

import './ChannelList.scss';

const ChannelList = ({ channels, clients }: ChannelListProps) => {
  return (
    <ul className='channelList'>
      {channels.map(channel => {
        return (
          <li key={channel.id}>
            <ChannelEntry channel={channel} clients={clients} />
          </li>
        );
      })}
    </ul>
  );
};

export default ChannelList;
