mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
feat: ability context.
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
export * from './useLocalStorage';
|
export * from './useLocalStorage';
|
||||||
export * from './usePrevious';
|
export * from './usePrevious';
|
||||||
export * from './useUpdateEffect';
|
export * from './useUpdateEffect';
|
||||||
@@ -7,4 +5,5 @@ export * from './useWatch';
|
|||||||
export * from './useWhen';
|
export * from './useWhen';
|
||||||
export * from './useRequestPdf';
|
export * from './useRequestPdf';
|
||||||
export * from './useAsync';
|
export * from './useAsync';
|
||||||
export * from './useIntersectionObserver';
|
export * from './useIntersectionObserver';
|
||||||
|
export * from './useAbilityContext';
|
||||||
6
src/hooks/utils/useAbilityContext.js
Normal file
6
src/hooks/utils/useAbilityContext.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { useAbility } from '@casl/react';
|
||||||
|
import { AbilityContext } from '../../components/Can';
|
||||||
|
|
||||||
|
export const useAbilityContext = () => useAbility(AbilityContext);
|
||||||
|
|
||||||
Reference in New Issue
Block a user