diff --git a/src/reducers/index.js b/src/reducers/index.js index fe990a0..57d9659 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -2,10 +2,12 @@ import {encodeData} from "../utils/qrcodeHandler"; import {actionTypes} from "../constant/ActionTypes"; import {QRBTF_URL} from "../constant/References"; import {getExactValue} from "../utils/util"; +import {RendererRect} from "../components/renderer/RendererBase"; const initialState = { selectedIndex: 0, value: 'A1', + rendererType: RendererRect, correctLevel: 0, textUrl: QRBTF_URL, textUrlArray: [], @@ -32,6 +34,7 @@ export default function appReducer(state = initialState, action) { case actionTypes.CHANGE_STYLE: { return Object.assign({}, state, { value: action.value, + rendererType: action.rendererType, selectedIndex: action.rendererIndex, history: state.history.slice().concat(action.value) });