Propagate producer score into state.

This commit is contained in:
Håvar Aambø Fosstveit
2020-05-10 20:43:51 +02:00
parent 36b40fd795
commit 7ab388a714
+11
View File
@@ -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;
}