FYP: batch resolve results

This commit is contained in:
infinite-persistence 2022-03-16 10:57:26 +08:00
parent fc3e3ae844
commit e9559efe10
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -256,12 +256,11 @@ export const doFetchPersonalRecommendations = () => (dispatch: Dispatch, getStat
.then((data) => {
const { gid, recs } = data;
if (gid && recs) {
const uris = processLighthouseResults(recs);
dispatch(doResolveUris(uris));
dispatch({
type: ACTIONS.FYP_FETCH_SUCCESS,
data: {
gid,
uris: processLighthouseResults(recs),
},
data: { gid, uris },
});
} else {
dispatch({ type: ACTIONS.FYP_FETCH_FAILED });