feat: Initial setup of theme.
This commit is contained in:
17
src/redux/index.js
Normal file
17
src/redux/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import { combineReducers } from 'redux';
|
||||
import { authReducer } from './AuthRedux';
|
||||
|
||||
// Combine all reducers.
|
||||
const appReducer = combineReducers({
|
||||
auth: authReducer
|
||||
});
|
||||
|
||||
const rootReducer = (state, action) => {
|
||||
// Clear all data in redux store to initial.
|
||||
if (action.type === 'LOGOUT') {
|
||||
state = undefined;
|
||||
}
|
||||
|
||||
return appReducer(state, action);
|
||||
};
|
||||
export default rootReducer;
|
||||
Reference in New Issue
Block a user