18 lines
427 B
JavaScript
18 lines
427 B
JavaScript
import { currentViewActionTypes } from "./action";
|
|
|
|
const currentViewInitialState = {
|
|
currentView: {},
|
|
};
|
|
|
|
export default function reducer(state = currentViewInitialState, action) {
|
|
switch (action.type) {
|
|
case currentViewActionTypes.SETCURRENTVIEW:
|
|
return {
|
|
...state,
|
|
currentView: action.currentView,
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
}
|