Shun Miyazawa 4 лет назад
Родитель
Сommit
b66a4e357f
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/app/src/stores/user-group.tsx

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

@@ -76,14 +76,14 @@ export const useSWRxSelectableParentUserGroups = (groupId: string | undefined):
 
 export const useSWRxSelectableChildUserGroups = (groupId: string | undefined): SWRResponse<IUserGroupHasId[], Error> => {
   return useSWRImmutable(
-    groupId != null ? ['/user-groups/selectable-child-groups'] : null,
+    groupId != null ? ['/user-groups/selectable-child-groups', groupId] : null,
     endpoint => apiv3Get<SelectableUserChildGroupsResult>(endpoint, { groupId }).then(result => result.data.selectableChildGroups),
   );
 };
 
 export const useSWRxAncestorUserGroups = (groupId: string | undefined): SWRResponse<IUserGroupHasId[], Error> => {
   return useSWRImmutable(
-    groupId != null ? ['/user-groups/ancestors'] : null,
+    groupId != null ? ['/user-groups/ancestors', groupId] : null,
     endpoint => apiv3Get<AncestorUserGroupsResult>(endpoint, { groupId }).then(result => result.data.ancestorUserGroups),
   );
 };