Initial commit
This commit is contained in:
commit
7878e653a0
253 changed files with 24552 additions and 0 deletions
23
src/bootstrap/hooks/useInitializeRunCount.ts
Normal file
23
src/bootstrap/hooks/useInitializeRunCount.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { internalPropertiesIncrement, internalPropertiesSet } from '../../redux/actions/internal-properties';
|
||||
|
||||
function useInitializeRunCount(storeReady: boolean) {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(
|
||||
() => {
|
||||
if (storeReady) {
|
||||
dispatch(
|
||||
internalPropertiesIncrement(
|
||||
'RunCount',
|
||||
internalPropertiesSet('InitializedRunCount', true),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
[storeReady],
|
||||
);
|
||||
}
|
||||
|
||||
export default useInitializeRunCount;
|
Loading…
Add table
Add a link
Reference in a new issue