Skip to content

Commit

Permalink
fix: use right param on post preferences to set active season, remove…
Browse files Browse the repository at this point in the history
… uneed tags is_latest and version from challenge card
  • Loading branch information
lucasgdev committed Jul 28, 2020
1 parent ef9b514 commit 674890e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
6 changes: 2 additions & 4 deletions web/src/actions/userSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 0 additions & 12 deletions web/src/components/challenges/ChallengeCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ const ChallengeCard = ({ challenge }) => {
<p>{flavor.changelog}</p>
</Grid.Col>
</Grid.Row>
<Grid.Row>
<Grid.Col auto>
<Tag.List>
<Tag color="dark" addOn={flavor.version} addOnColor="warning">
version
</Tag>
<Tag addOn={flavor.is_latest.toString()} addOnColor="success">
is_latest
</Tag>
</Tag.List>
</Grid.Col>
</Grid.Row>
<ChallengeModal
open={modalOpen}
onClose={onCloseModal}
Expand Down

0 comments on commit 674890e

Please sign in to comment.