import InfiniteScroll from 'react-infinite-scroll-component' import { Loader } from '../../design/Loader' import { Guild } from './Guild' import { useGuilds } from '../../../contexts/Guilds' import { GuildsChannelsPath } from '..' 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 })}
) }