From 674890e5bd7287337920f09353ed18bebb5a998b Mon Sep 17 00:00:00 2001 From: Lucas Santos Date: Tue, 28 Jul 2020 13:07:53 -0300 Subject: [PATCH] fix: use right param on post preferences to set active season, remove uneed tags is_latest and version from challenge card --- web/src/actions/userSession.js | 6 ++---- web/src/components/challenges/ChallengeCard.js | 12 ------------ 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/web/src/actions/userSession.js b/web/src/actions/userSession.js index 530752c89..fc6bf4237 100644 --- a/web/src/actions/userSession.js +++ b/web/src/actions/userSession.js @@ -36,15 +36,13 @@ export const fetchUserSession = postPreferences => async dispatch => { try { const userSessionResponse = await getUserSession(); const { data: userSessionData } = userSessionResponse; - const defaultSeasonTeamSet = userSessionData.seasons.find( - item => item.season.is_default - ); + const activeSeasonId = userSessionData.user.active_season_id; dispatch(setUserSession(userSessionData)); if (postPreferences) { - dispatch(fetchPreferencesAction(defaultSeasonTeamSet.season.id)); + dispatch(fetchPreferencesAction(activeSeasonId)); } if (activeSeasonId) { diff --git a/web/src/components/challenges/ChallengeCard.js b/web/src/components/challenges/ChallengeCard.js index 543d103bb..5554043ce 100644 --- a/web/src/components/challenges/ChallengeCard.js +++ b/web/src/components/challenges/ChallengeCard.js @@ -45,18 +45,6 @@ const ChallengeCard = ({ challenge }) => {

{flavor.changelog}

- - - - - version - - - is_latest - - - -