import { SET_PAGINATION } from '../../utils/types'

export default {
  [SET_PAGINATION](state, payload) {
    let limit = parseInt(payload.perPage)
    let offset = limit * (payload.page - 1)
    state.paginations[payload.name] = { limit: limit, offset: offset, page: payload.page }
  },
}
