tycho-components 0.0.9-SNAPSHOT-1 → 0.0.9-SNAPSHOT-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,5 +13,6 @@ export declare const useMessageUtils: () => {
13
13
  dispatchLoading: (val: boolean) => void;
14
14
  dispatchError: ({ err, t, key }: ErrorDispatcher) => void;
15
15
  dispatchMessage: ({ key, ns, t }: MessageDispatcher) => void;
16
+ isLoading: () => boolean;
16
17
  };
17
18
  export {};
@@ -2,7 +2,10 @@ import { useContext } from 'react';
2
2
  import { message, toastLoading } from '../configs/store/actions';
3
3
  import CommonContext from './CommonContext';
4
4
  export const useMessageUtils = () => {
5
- const { dispatch } = useContext(CommonContext);
5
+ const { state, dispatch } = useContext(CommonContext);
6
+ const isLoading = () => {
7
+ return state.toastLoading;
8
+ };
6
9
  const dispatchLoading = (val) => {
7
10
  dispatch(toastLoading(val));
8
11
  };
@@ -31,5 +34,6 @@ export const useMessageUtils = () => {
31
34
  dispatchLoading,
32
35
  dispatchError,
33
36
  dispatchMessage,
37
+ isLoading,
34
38
  };
35
39
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.0.9-SNAPSHOT-1",
4
+ "version": "0.0.9-SNAPSHOT-2",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {