11 lines
310 B
JavaScript
11 lines
310 B
JavaScript
import { evolve, map, when, propEq, set, lensProp } from 'ramda'
|
|
|
|
export const cancelProfile = (state, id) => {
|
|
const updateMatch = when(
|
|
propEq('idProfile', id),
|
|
set(lensProp('canceled'), true)
|
|
)
|
|
const transformation = { fundProfiles: map(updateMatch) }
|
|
return evolve(transformation, state)
|
|
}
|