removed redux necessary files
This commit is contained in:
parent
9ab2f40f19
commit
a719c6e582
|
@ -1,8 +0,0 @@
|
||||||
export const RESET_USERS = 'RESET_USERS';
|
|
||||||
|
|
||||||
export const resetUsers = list => {
|
|
||||||
return {
|
|
||||||
type: RESET_USERS,
|
|
||||||
payload: list
|
|
||||||
}
|
|
||||||
};
|
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
export const SETTINGS_PAGE_ORIENTATION_CHANGED = 'PAGE_ORIENTATION_CHANGED';
|
|
||||||
|
|
||||||
export const changePageOrientation = isPortrait => {
|
|
||||||
return {
|
|
||||||
type: SETTINGS_PAGE_ORIENTATION_CHANGED,
|
|
||||||
isPortrait: isPortrait
|
|
||||||
}
|
|
||||||
};
|
|
|
@ -1,15 +0,0 @@
|
||||||
import { combineReducers } from 'redux';
|
|
||||||
import settingsReducer from './settings'
|
|
||||||
import usersReducer from '../../../../../common/mobile/lib/store/users'
|
|
||||||
|
|
||||||
export const initialState = {
|
|
||||||
settings: {
|
|
||||||
isPortrait: true
|
|
||||||
},
|
|
||||||
users: []
|
|
||||||
};
|
|
||||||
|
|
||||||
export const rootReducer = combineReducers({
|
|
||||||
settings: settingsReducer,
|
|
||||||
users: usersReducer
|
|
||||||
});
|
|
|
@ -1,12 +0,0 @@
|
||||||
|
|
||||||
import * as actionTypes from '../actions/actions'
|
|
||||||
|
|
||||||
const settingsReducer = (state = [], action) => {
|
|
||||||
if (action.type == actionTypes.SETTINGS_PAGE_ORIENTATION_CHANGED) {
|
|
||||||
return {isPortrait: action.isPortrait};
|
|
||||||
}
|
|
||||||
|
|
||||||
return state;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default settingsReducer;
|
|
|
@ -1,9 +0,0 @@
|
||||||
import { createStore } from 'redux'
|
|
||||||
import { rootReducer, initialState } from './reducers/root'
|
|
||||||
|
|
||||||
const store = createStore(rootReducer, initialState);
|
|
||||||
|
|
||||||
!window.Common && (window.Common = {});
|
|
||||||
Common.Store = { get: () => store };
|
|
||||||
|
|
||||||
export { store };
|
|
Loading…
Reference in a new issue