Skip to content

Commit 1743ba5

Browse files
committed
create config reducers
1 parent 1b73f13 commit 1743ba5

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

src-react/reducers/config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { combineReducers } from 'redux';
2+
3+
import ungitConfig from './ungit-config';
4+
import userConfig from './user-config';
5+
import versions from './versions';
6+
7+
const config = combineReducers({
8+
ungitConfig,
9+
userConfig,
10+
versions
11+
});
12+
13+
export default config;

src-react/reducers/index.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import { combineReducers } from 'redux';
22

33
import path from './path';
4-
import ungitConfig from './ungit-config';
5-
import userConfig from './user-config';
6-
import versions from './versions';
7-
4+
import config from './config';
85

96
const ungitApp = combineReducers({
10-
ungitConfig,
11-
userConfig,
12-
versions,
7+
config,
138
path
149
});
1510

src-react/store.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ import thunk from 'redux-thunk';
33
import ungitApp from './reducers';
44

55
const initialState = {
6-
ungitConfig: null,
7-
userConfig: null,
8-
versions: {
9-
gitVersion: null,
10-
latestVersion: null
6+
config: {
7+
ungitConfig: null,
8+
userConfig: null,
9+
versions: {
10+
gitVersion: null,
11+
latestVersion: null
12+
}
1113
},
1214
path: {
1315
pending: null,

0 commit comments

Comments
 (0)