Propagate producer score into state.
This commit is contained in:
1 parent
36b40fd795
commit
7ab388a714
1 file changed
+11
@@ -60,6 +60,17 @@ const producers = (state = initialState, action) =>
|
||||
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:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user