Shun Miyazawa 4 년 전
부모
커밋
3675bf3a71
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/app/src/stores/user-group.tsx

+ 2 - 2
packages/app/src/stores/user-group.tsx

@@ -34,10 +34,10 @@ export const useSWRxChildUserGroupList = (
   );
   );
 };
 };
 
 
-export const useSWRxUserGroupRelations = (groupId: string) => {
+export const useSWRxUserGroupRelations = (groupId: string): SWRResponse<IUserGroupRelationHasId[], Error> => {
   return useSWRImmutable(
   return useSWRImmutable(
     groupId != null ? [`user-groups/${groupId}/user-group-relations`] : null,
     groupId != null ? [`user-groups/${groupId}/user-group-relations`] : null,
-    endpoint => apiv3Get(endpoint).then(result => result.data),
+    endpoint => apiv3Get<UserGroupRelationListResult>(endpoint).then(result => result.data.userGroupRelations),
   );
   );
 };
 };