diff --git a/ui/src/shared/reducers/appConfig.js b/ui/src/shared/reducers/appConfig.js new file mode 100644 index 0000000000..05c2006048 --- /dev/null +++ b/ui/src/shared/reducers/appConfig.js @@ -0,0 +1,16 @@ +const initialState = { + autoRefreshMs: 15000, +}; + +export default function appConfig(state = initialState, action) { + switch (action.type) { + case 'SET_AUTOREFRESH': { + return { + ...state, + autoRefreshMs: action.payload, + } + } + } + + return state +} diff --git a/ui/src/shared/reducers/index.js b/ui/src/shared/reducers/index.js index 47ed0c62f4..233c4ff97e 100644 --- a/ui/src/shared/reducers/index.js +++ b/ui/src/shared/reducers/index.js @@ -1,4 +1,5 @@ import appUI from './ui'; +import appConfig from './appConfig'; import me from './me'; import auth from './auth'; import notifications from './notifications'; @@ -6,6 +7,7 @@ import sources from './sources'; export { appUI, + appConfig, me, auth, notifications,