mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-04-22 15:57:59 +00:00
16 lines
459 B
TypeScript
16 lines
459 B
TypeScript
// Copyright 2017-2026 @pezkuwi/react-hooks authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { QueueProps } from '@pezkuwi/react-components/Status/types';
|
|
|
|
import { useContext } from 'react';
|
|
|
|
import { QueueCtx } from './ctx/Queue.js';
|
|
import { createNamedHook } from './createNamedHook.js';
|
|
|
|
function useQueueImpl (): QueueProps {
|
|
return useContext(QueueCtx);
|
|
}
|
|
|
|
export const useQueue = createNamedHook('useQueue', useQueueImpl);
|