Propagate producer score into state.

auto_join_3.3
Håvar Aambø Fosstveit 2020-05-10 20:43:51 +02:00
parent 36b40fd795
commit 7ab388a714
1 changed files with 11 additions and 0 deletions

View File

@ -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;
} }