mg-library 1.0.346 → 1.0.348

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/reducers.js +24 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.346",
3
+ "version": "1.0.348",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/reducers.js CHANGED
@@ -7,3 +7,27 @@ export const initialStateSession = {
7
7
  isProcessing: false,
8
8
  bell: false
9
9
  }
10
+
11
+ export const apiRequest: (state) => {
12
+ state.isFetching = true;
13
+ }
14
+
15
+ export const apiSuccess: (state) => {
16
+ state.isFetching = false;
17
+ }
18
+
19
+ export const apiError: (state) => {
20
+ state.isFetching = false;
21
+ }
22
+
23
+ export const startProcessing: (state) => {
24
+ state.isProcessing = true;
25
+ }
26
+
27
+ export const endProcessing: (state) => {
28
+ state.isProcessing = false;
29
+ }
30
+
31
+ export const ringBell: (state) => {
32
+ state.bell = !state.bell;
33
+ }