17 lines
439 B
JavaScript
17 lines
439 B
JavaScript
import * as types from "./actionTypes";
|
|
import initialState from "../../redux/reducers/initialState";
|
|
import { botType } from "./botType";
|
|
|
|
export default function chatbotReducer(state = initialState.snackbar, action) {
|
|
switch (action.type) {
|
|
case types.SUMMON_WIZARD:
|
|
return { ...state, type: botType.wizard };
|
|
|
|
case types.CANCEL_BOT:
|
|
return { ...state, type: botType.none };
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|