@edifice.io/react 2.6.5-develop-pedago.20260922102604 → 2.6.5-develop-pedago.20260922145203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ const Communities = ({
14
14
  t
15
15
  } = useTranslation();
16
16
  return /* @__PURE__ */ jsxs(HomeCard, { variant: "primary", children: [
17
- /* @__PURE__ */ jsx(HomeCard.Header, { actionLabel: communitiesList.length > 0 ? t("homepage.widget.communities.actionLabel.seeMore") : t("homepage.widget.communities.actionLabel.create"), actionRightIcon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}), onActionClick: handleActionClick, title: t("homepage.widget.communities.title") }),
17
+ /* @__PURE__ */ jsx(HomeCard.Header, { actionLabel: communitiesList.length > 0 ? t("homepage.communities.actionLabel.seeMore") : t("homepage.communities.actionLabel.create"), actionRightIcon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}), onActionClick: handleActionClick, title: t("homepage.communities.title") }),
18
18
  /* @__PURE__ */ jsx(HomeCard.Content, { children: /* @__PURE__ */ jsx(Flex, { gap: "16", children: communitiesList.length > 0 ? communitiesList.map((community, index) => /* @__PURE__ */ jsx(CommunityItem, { title: community.title, communityImage: community.communityImage, onActionClick: community.onActionClick, nbNotifications: community.nbNotifications }, index)) : /* @__PURE__ */ jsxs("div", { className: "communities-empty", children: [
19
19
  /* @__PURE__ */ jsx(Image, { src: illuCommunities, alt: "", "aria-hidden": "true", style: {
20
20
  width: 80,
@@ -13,8 +13,7 @@ function CommunitiesContainer({
13
13
  error
14
14
  } = useCommunities(), mappedCommunities = useMemo(() => communities.map((community) => ({
15
15
  title: community.title,
16
- communityImage: community.communityImage ?? community.icon ?? "",
17
- nbNotifications: community.nbNotifications ?? community.notifications,
16
+ communityImage: community.image ?? "",
18
17
  onActionClick: () => onCommunityClick == null ? void 0 : onCommunityClick(community)
19
18
  })), [communities, onCommunityClick]);
20
19
  return isLoading ? /* @__PURE__ */ jsx(CommunitiesSkeleton, {}) : error ? "An error occurred while loading communities." : /* @__PURE__ */ jsx(Communities, { communitiesList: mappedCommunities, handleActionClick: onHeaderActionClick });
@@ -1,10 +1,7 @@
1
1
  export interface CommunitiesModel {
2
2
  id: number | string;
3
3
  title: string;
4
- communityImage?: string;
5
- icon?: string;
6
- nbNotifications?: number;
7
- notifications?: number;
4
+ image?: string;
8
5
  }
9
6
  export declare function useCommunities(): {
10
7
  communities: CommunitiesModel[];
@@ -8,10 +8,10 @@ function useCommunities() {
8
8
  } = useQuery(queryOptions({
9
9
  queryKey: ["communities", "preview"],
10
10
  queryFn: async () => {
11
- const http = odeServices.http(), communities = await http.get("/community/api/v1/communities");
11
+ const http = odeServices.http(), response = await http.get("/communities/api/communities?page=1&size=4");
12
12
  if (http.isResponseError())
13
13
  throw new Error(http.latestResponse.statusText);
14
- return communities;
14
+ return response.items;
15
15
  }
16
16
  }));
17
17
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.6.5-develop-pedago.20260922102604",
3
+ "version": "2.6.5-develop-pedago.20260922145203",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -140,9 +140,9 @@
140
140
  "swiper": "10.1.0",
141
141
  "ua-parser-js": "1.0.36",
142
142
  "zustand": "4.5.7",
143
- "@edifice.io/utilities": "2.6.5-develop-pedago.20260922102604",
144
- "@edifice.io/bootstrap": "2.6.5-develop-pedago.20260922102604",
145
- "@edifice.io/tiptap-extensions": "2.6.5-develop-pedago.20260922102604"
143
+ "@edifice.io/utilities": "2.6.5-develop-pedago.20260922145203",
144
+ "@edifice.io/tiptap-extensions": "2.6.5-develop-pedago.20260922145203",
145
+ "@edifice.io/bootstrap": "2.6.5-develop-pedago.20260922145203"
146
146
  },
147
147
  "devDependencies": {
148
148
  "@babel/plugin-transform-react-pure-annotations": "7.27.1",
@@ -173,8 +173,8 @@
173
173
  "vite": "5.4.14",
174
174
  "vite-plugin-dts": "4.5.4",
175
175
  "vite-tsconfig-paths": "5.1.4",
176
- "@edifice.io/client": "2.6.5-develop-pedago.20260922102604",
177
- "@edifice.io/config": "2.6.5-develop-pedago.20260922102604"
176
+ "@edifice.io/client": "2.6.5-develop-pedago.20260922145203",
177
+ "@edifice.io/config": "2.6.5-develop-pedago.20260922145203"
178
178
  },
179
179
  "peerDependencies": {
180
180
  "@react-spring/web": "9.7.5",