[ ADD ] react configuration

This commit is contained in:
Kuroi488
2020-11-16 17:14:34 +01:00
parent 89c9cfe099
commit 5078a1a96e
71 changed files with 16891 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import * as types from './SnackbarTypes';
export const showSnackbarAction = (message , snacknarType) => {
return {
type: types.SHOW_SNACKBAR,
message ,
snacknarType
};
};
export const hideSnackbarAction = () => {
return {
type: types.HIDE_SNACKBAR
};
};

View File

@ -0,0 +1,21 @@
import * as types from "./SnackbarTypes";
export default (state = {}, action) => {
switch (action.type) {
case types.SHOW_SNACKBAR:
return {
...state,
isOpen: true,
message: action.message,
type: action.snacknarType
};
case types.HIDE_SNACKBAR:
return {
...state,
isOpen: false
};
default:
return state;
}
};

View File

@ -0,0 +1,2 @@
export const SHOW_SNACKBAR = 'SHOW_SNACKBAR';
export const HIDE_SNACKBAR = 'HIDE_SNACKBAR';