import React, { useState } from 'react'; import { Carousel, Stack, Text } from 'soapbox/components/ui'; import PlaceholderGroupDiscover from 'soapbox/features/placeholder/components/placeholder-group-discover'; import { usePopularGroups } from 'soapbox/queries/groups'; import Group from './group'; const PopularGroups = () => { const { groups, isFetching } = usePopularGroups(); const [groupCover, setGroupCover] = useState(null); return ( Popular Groups {({ width }: { width: number }) => ( <> {isFetching ? ( new Array(20).fill(0).map((_, idx) => (
)) ) : ( groups.map((group) => ( )) )} )}
); }; export default PopularGroups;