From e6621a802b34131ee81481955a010f0442c5bce5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 16 Mar 2023 13:18:36 -0500 Subject: [PATCH] Make popular and suggested groups share the Group store --- app/soapbox/entity-store/entities.ts | 2 -- app/soapbox/hooks/api/usePopularGroups.ts | 2 +- app/soapbox/hooks/api/useSuggestedGroups.ts | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/soapbox/entity-store/entities.ts b/app/soapbox/entity-store/entities.ts index 05d7b60d9..30220eed6 100644 --- a/app/soapbox/entity-store/entities.ts +++ b/app/soapbox/entity-store/entities.ts @@ -2,6 +2,4 @@ export enum Entities { GROUPS = 'Groups', GROUP_RELATIONSHIPS = 'GroupRelationships', GROUP_MEMBERSHIPS = 'GroupMemberships', - POPULAR_GROUPS = 'PopularGroups', - SUGGESTED_GROUPS = 'SuggestedGroups', } \ No newline at end of file diff --git a/app/soapbox/hooks/api/usePopularGroups.ts b/app/soapbox/hooks/api/usePopularGroups.ts index e856270a5..88ae48c9d 100644 --- a/app/soapbox/hooks/api/usePopularGroups.ts +++ b/app/soapbox/hooks/api/usePopularGroups.ts @@ -9,7 +9,7 @@ function usePopularGroups() { const features = useFeatures(); const { entities, ...result } = useEntities( - [Entities.POPULAR_GROUPS, ''], + [Entities.GROUPS, 'popular'], '/api/mock/groups', // '/api/v1/truth/trends/groups' { schema: groupSchema, diff --git a/app/soapbox/hooks/api/useSuggestedGroups.ts b/app/soapbox/hooks/api/useSuggestedGroups.ts index 54477c249..c1b85805c 100644 --- a/app/soapbox/hooks/api/useSuggestedGroups.ts +++ b/app/soapbox/hooks/api/useSuggestedGroups.ts @@ -9,7 +9,7 @@ function useSuggestedGroups() { const features = useFeatures(); const { entities, ...result } = useEntities( - [Entities.SUGGESTED_GROUPS, ''], + [Entities.GROUPS, 'suggested'], '/api/mock/groups', // '/api/v1/truth/suggestions/groups' { schema: groupSchema,