* feat: add StakingAsync context and hooks for improved staking API integration * refactor: rename isStakingAsyncPage to isStakingAsync for consistency across components * feat: introduce useBestNumberRelay hook for enhanced best number retrieval based on staking async state * feat: add 'Kusama Asset Hub' link to Polkassembly and Subsquare configurations
16 lines
521 B
TypeScript
16 lines
521 B
TypeScript
// Copyright 2017-2025 @polkadot/react-hooks authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { StakingAsyncApis } from './ctx/types.js';
|
|
|
|
import { useContext } from 'react';
|
|
|
|
import { StakingAsyncApisCtx } from './ctx/StakingAsync.js';
|
|
import { createNamedHook } from './createNamedHook.js';
|
|
|
|
function useStakingAsyncApisImpl (): StakingAsyncApis {
|
|
return useContext(StakingAsyncApisCtx);
|
|
}
|
|
|
|
export const useStakingAsyncApis = createNamedHook('useStakingAsyncApis', useStakingAsyncApisImpl);
|