import clsx from 'clsx'; import React, { useCallback, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { Components, Virtuoso, VirtuosoGrid } from 'react-virtuoso'; import { Column, HStack, Icon } from 'soapbox/components/ui'; import { useSuggestedGroups } from 'soapbox/hooks/api/useSuggestedGroups'; import GroupGridItem from './components/discover/group-grid-item'; import GroupListItem from './components/discover/group-list-item'; import type { Group } from 'soapbox/schemas'; const messages = defineMessages({ label: { id: 'groups.popular.label', defaultMessage: 'Suggested Groups' }, }); enum Layout { LIST = 'LIST', GRID = 'GRID' } const GridList: Components['List'] = React.forwardRef((props, ref) => { const { context, ...rest } = props; return
; }); const Suggested: React.FC = () => { const intl = useIntl(); const [layout, setLayout] = useState