ghost-portal/packages/react-hooks/src/useBlockAuthors.ts
2024-01-08 15:06:30 +02:00

16 lines
489 B
TypeScript

// Copyright 2017-2024 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { BlockAuthors } from './ctx/types.js';
import { useContext } from 'react';
import { BlockAuthorsCtx } from './ctx/BlockAuthors.js';
import { createNamedHook } from './createNamedHook.js';
function useBlockAuthorsImpl (): BlockAuthors {
return useContext(BlockAuthorsCtx);
}
export const useBlockAuthors = createNamedHook('useBlockAuthors', useBlockAuthorsImpl);