import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; import { useGroups } from 'pl-fe/api/hooks/groups/use-groups'; import GroupCard from 'pl-fe/components/group-card'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Button from 'pl-fe/components/ui/button'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import PlaceholderGroupCard from 'pl-fe/features/placeholder/components/placeholder-group-card'; import { useModalsStore } from 'pl-fe/stores/modals'; const Groups: React.FC = () => { const { openModal } = useModalsStore(); const { groups, isLoading, hasNextPage, fetchNextPage } = useGroups(); const handleLoadMore = () => { if (hasNextPage) { fetchNextPage(); } }; const createGroup = () => openModal('CREATE_GROUP'); const renderBlankslate = () => ( ); return ( {!(!isLoading && groups.length === 0) && ( )} {groups.map((group) => ( ))} ); }; export { Groups as default };