Propagate producer score into state.
parent
36b40fd795
commit
7ab388a714
|
|
@ -60,6 +60,17 @@ const producers = (state = initialState, action) =>
|
||||||
return { ...state, [producerId]: newProducer };
|
return { ...state, [producerId]: newProducer };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 'SET_PRODUCER_SCORE':
|
||||||
|
{
|
||||||
|
const { producerId, score } = action.payload;
|
||||||
|
|
||||||
|
const producer = state[producerId];
|
||||||
|
|
||||||
|
const newProducer = { ...producer, score };
|
||||||
|
|
||||||
|
return { ...state, [producerId]: newProducer };
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue