diff --git a/assets/espaceco/pages/communities/Communities.tsx b/assets/espaceco/pages/communities/Communities.tsx index 9fd9c42a..22580128 100644 --- a/assets/espaceco/pages/communities/Communities.tsx +++ b/assets/espaceco/pages/communities/Communities.tsx @@ -115,11 +115,11 @@ const Communities: FC = () => { {communityQuery.isLoading || communitiesAsMember.isLoading ? ( ) : community ? ( - + ) : filter === "public" ? ( - communityQuery.data && ( + communityQuery.data && communityQuery.data.content.length ? (
- +
{ />
- ) - ) : ( - communitiesAsMember.data && ( -
- -
- routes.espaceco_community_list({ filter: filter, page: pageNumber }).link} - /> -
+ ) : ( +
+
) + ) : communitiesAsMember.data && communitiesAsMember.data.content.length ? ( +
+ +
+ routes.espaceco_community_list({ filter: filter, page: pageNumber }).link} + /> +
+
+ ) : ( +
+ +
)}
diff --git a/assets/espaceco/pages/communities/CommunityList.tsx b/assets/espaceco/pages/communities/CommunityList.tsx index 3e01f7f1..ed293bb8 100644 --- a/assets/espaceco/pages/communities/CommunityList.tsx +++ b/assets/espaceco/pages/communities/CommunityList.tsx @@ -1,31 +1,18 @@ -import { fr } from "@codegouvfr/react-dsfr"; -import Alert from "@codegouvfr/react-dsfr/Alert"; import { FC } from "react"; import { CommunityResponseDTO } from "../../../@types/espaceco"; import CommunityListItem from "./CommunityListItem"; -import { CommunityListFilter } from "../../../@types/app_espaceco"; -import { useTranslation } from "../../../i18n/i18n"; type CommunityListProps = { communities: CommunityResponseDTO[]; - filter: CommunityListFilter; }; -const CommunityList: FC = ({ communities, filter }) => { - const { t } = useTranslation("EspaceCoCommunities"); - +const CommunityList: FC = ({ communities }) => { return (
- {communities.length === 0 ? ( -
- -
- ) : ( - communities.map((community, index) => { - const className = index % 2 === 0 ? "frx-community-even" : ""; - return ; - }) - )} + {communities.map((community, index) => { + const className = index % 2 === 0 ? "frx-community-even" : ""; + return ; + })}
); };