//@flow

import { updateObject } from "../../reducers/utils";

export default (
  state: { breakpoints: { main: string } },
  action: { type: string, newLayout: string, component: string }
) =>
  updateObject(state, {
    breakpoints: updateObject(state.breakpoints, {
      [action.component]: action.newLayout
    })
  });

//@flow

import { updateObject } from "../../reducers/utils";

export default (
  state: { breakpoints: { main: string } },
  action: {
    type: string,
    component: string,
    query: { [string]: string }
  }
) =>
  updateObject(state, {
    breakpoints: updateObject(state.breakpoints, {
      [action.component]: updateObject(
        state.breakpoints[action.component],
        action.query
      )
    })
  });

Update breakpoint reducer to assign deeper queries object
Update breakpoint reducer to assign deeper queries object

