michaltakac/mathworldvr

View on GitHub
src/reducers/functionBox/index.js

Summary

Maintainability
A
50 mins
Test Coverage
import * as ActionTypes from 'actions'

const initialState = {
  position: { x: 0.65, y: 1.45, z: -1.03 },
}

export default (state = initialState, action) => {
  switch (action.type) {
    case ActionTypes.FUNCTION_BOX_SET_POSITION:
      return { ...state, position: action.payload }
    default: return state
  }
}