@calimero-network/mero-react 2.3.0 → 2.4.0

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.
package/dist/index.cjs CHANGED
@@ -1493,6 +1493,18 @@ function useJoinContext() {
1493
1493
  );
1494
1494
  return { joinContext, loading, error };
1495
1495
  }
1496
+ function useJoinSubgroupInheritance() {
1497
+ const { mero } = useMero();
1498
+ const { loading, error, run } = useAsyncMutation();
1499
+ const joinSubgroupInheritance = react.useCallback(
1500
+ async (groupId) => {
1501
+ if (!mero) return null;
1502
+ return run(() => mero.admin.joinSubgroupInheritance(groupId));
1503
+ },
1504
+ [mero, run]
1505
+ );
1506
+ return { joinSubgroupInheritance, loading, error };
1507
+ }
1496
1508
  function useContextGroup(contextId) {
1497
1509
  const { mero } = useMero();
1498
1510
  const [groupId, setGroupId] = react.useState(null);
@@ -2350,6 +2362,7 @@ exports.useGroupUpgradeStatus = useGroupUpgradeStatus;
2350
2362
  exports.useJoinContext = useJoinContext;
2351
2363
  exports.useJoinGroup = useJoinGroup;
2352
2364
  exports.useJoinNamespace = useJoinNamespace;
2365
+ exports.useJoinSubgroupInheritance = useJoinSubgroupInheritance;
2353
2366
  exports.useMemberMetadata = useMemberMetadata;
2354
2367
  exports.useMero = useMero;
2355
2368
  exports.useNamespace = useNamespace;