Reset, reset
This commit is contained in:
@ -1,26 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
import Language from './../language/Language';
|
||||
import { SET_LANGUAGE, LANGUAGES } from './../actions/language';
|
||||
|
||||
const initialState = {
|
||||
code: Language.getLanguage()
|
||||
};
|
||||
|
||||
function language(state, action) {
|
||||
if(typeof state === typeof undefined) {
|
||||
state = initialState;
|
||||
}
|
||||
|
||||
switch(action.type) {
|
||||
case SET_LANGUAGE:
|
||||
if(!(action.theme)) return state;
|
||||
return {
|
||||
code: action.code
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
export default language;
|
@ -1,13 +0,0 @@
|
||||
'use strict';
|
||||
import {combineReducers} from 'redux';
|
||||
|
||||
//Import Reducers
|
||||
import language from './language';
|
||||
|
||||
//Create our Reducer
|
||||
const rootReducer = combineReducers({
|
||||
language
|
||||
});
|
||||
|
||||
//Export the root reducer
|
||||
export default rootReducer;
|
Reference in New Issue
Block a user