From 625ee877834433e16c082b73c6778b826605c5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Stani=C3=B3w?= Date: Thu, 2 Nov 2017 22:00:33 +0100 Subject: [PATCH] fix(WhatsNewModal): Fix infinite loop of whats new modal --- package.json | 2 +- src/homepage/components/App.js | 2 +- src/shared/auth/auth.reducer.js | 4 ++-- src/shared/auth/auth.types.js | 2 +- src/shared/shared.sagas.js | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 30df4b3..3d228d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfoosball", - "version": "2.2.0", + "version": "2.2.1", "private": true, "devDependencies": { "autoprefixer": "6.5.1", diff --git a/src/homepage/components/App.js b/src/homepage/components/App.js index 68c63e0..1b5a041 100644 --- a/src/homepage/components/App.js +++ b/src/homepage/components/App.js @@ -20,7 +20,7 @@ export default class App extends React.Component {
); diff --git a/src/shared/auth/auth.reducer.js b/src/shared/auth/auth.reducer.js index 27a1d56..b1cccb6 100644 --- a/src/shared/auth/auth.reducer.js +++ b/src/shared/auth/auth.reducer.js @@ -1,7 +1,6 @@ import * as types from './auth.types'; import { REQUEST_SAVE_PROFILE, REQUEST_SAVE_MEMBER, SETTINGS_SAVED, - WHATS_NEW_SHOWN } from '../../settings/settings.actions'; export const profile = (state = {}, action) => { @@ -11,7 +10,7 @@ export const profile = (state = {}, action) => { return Object.assign({}, state, action.partialData); case SETTINGS_SAVED: return Object.assign({}, state, action.values); - case WHATS_NEW_SHOWN: + case types.WHATS_NEW_SHOWN: return Object.assign({}, state, {whats_new_version: action.version}); default: return state; @@ -49,6 +48,7 @@ export const auth = (state = {activate: activate()}, action) => { case REQUEST_SAVE_MEMBER: case REQUEST_SAVE_PROFILE: case SETTINGS_SAVED: + case types.WHATS_NEW_SHOWN: return { ...state, profile: profile(state.profile, action), diff --git a/src/shared/auth/auth.types.js b/src/shared/auth/auth.types.js index 7277130..e731224 100644 --- a/src/shared/auth/auth.types.js +++ b/src/shared/auth/auth.types.js @@ -6,4 +6,4 @@ export const SET_PROFILE = 'AUTH::SET_PROFILE'; export const ACTIVATE_REQUEST = 'AUTH::ACTIVATE_REQUEST'; export const ACTIVATE_SUCCESS = 'AUTH::ACTIVATE_SUCCESS'; export const ACTIVATE_FAILURE = 'AUTH::ACTIVATE_FAILURE'; -export const WHATS_NEW_SHOWN = 'SETTINGS::WHATS_NEW_SHOWN'; +export const WHATS_NEW_SHOWN = 'AUTH::WHATS_NEW_SHOWN'; diff --git a/src/shared/shared.sagas.js b/src/shared/shared.sagas.js index b5cfb03..75292ed 100644 --- a/src/shared/shared.sagas.js +++ b/src/shared/shared.sagas.js @@ -28,6 +28,7 @@ export function* whatsNewModal() { • Fix new match bug on mobile • Fix infinite authentication loop bug • Fix match deletion permissions bug + • Fix what's new modal bug `, onAccept: () => { },