diff --git a/app/soapbox/hooks/useGroups.ts b/app/soapbox/hooks/useGroups.ts index 865896e24..96f73dbe1 100644 --- a/app/soapbox/hooks/useGroups.ts +++ b/app/soapbox/hooks/useGroups.ts @@ -5,11 +5,15 @@ import { useEntities, useEntity } from 'soapbox/entity-store/hooks'; import { groupSchema, Group } from 'soapbox/schemas/group'; import { groupRelationshipSchema, GroupRelationship } from 'soapbox/schemas/group-relationship'; +import { useFeatures } from './useFeatures'; + function useGroups() { + const features = useFeatures(); + const { entities, ...result } = useEntities( [Entities.GROUPS, ''], '/api/v1/groups', - { schema: groupSchema }, + { enabled: features.groups, schema: groupSchema }, ); const { relationships } = useGroupRelationships(entities.map(entity => entity.id));