ghost-portal/packages/page-settings/src/useCounter.ts
2024-01-08 15:06:30 +02:00

15 lines
372 B
TypeScript

// Copyright 2017-2024 @polkadot/app-settings authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { createNamedHook } from '@polkadot/react-hooks';
import useExtensions from './useExtensions.js';
function useCounterImpl (): number {
const { count } = useExtensions();
return count;
}
export default createNamedHook('useCounter', useCounterImpl);