feat(Profile): Reactify profile page (#16743)

* feat(Profile): Reactify profile page

* chore(tidyup): Remove console.log

* fix(timeline): Remove legacy challenges from Timeline render

* fix(style): Remove underline on a:hover
This commit is contained in:
Stuart Taylor
2018-02-19 20:32:14 +00:00
committed by Quincy Larson
parent 24ef69cf7a
commit 3131c55782
41 changed files with 1368 additions and 242 deletions

View File

@@ -151,7 +151,17 @@ export const isChallengeLoaded = (state, { dashedName }) =>
export default composeReducers(
ns,
function metaReducer(state = defaultState, action) {
if (action.meta && action.meta.entities) {
const { meta } = action;
if (meta && meta.entities) {
if (meta.entities.user) {
return {
...state,
user: {
...state.user,
...meta.entities.user
}
};
}
return {
...state,
...action.meta.entities
@@ -159,7 +169,7 @@ export default composeReducers(
}
return state;
},
function(state = defaultState, action) {
function entitiesReducer(state = defaultState, action) {
if (getEntityAction(action)) {
const { payload: { username, theme } } = getEntityAction(action);
return {