import InfiniteScroll from 'react-infinite-scroll-component' import { Loader } from '../../design/Loader' import { useGuilds } from '../../../contexts/Guilds' import { GuildsChannelsPath } from '..' import { Guild } from './Guild' export interface GuildsProps { path: GuildsChannelsPath | string } export const Guilds: React.FC = (props) => { const { path } = props const { guilds, hasMore, nextPage } = useGuilds() return (
} > {guilds.map((guild) => { const selected = typeof path !== 'string' && path.guildId === guild.id return })}
) }