import InfiniteScroll from 'react-infinite-scroll-component' import { useChannels } from '../../../contexts/Channels' import { GuildsChannelsPath } from '../Application' import { Loader } from '../../design/Loader' import { Channel } from './Channel' export interface ChannelsProps { path: GuildsChannelsPath } export const Channels: React.FC = (props) => { const { path } = props const { channels, hasMore, nextPage } = useChannels() return (
} > {channels.map((channel) => { const selected = channel.id === path.channelId return ( ) })}
) }