From 93cc8d274a4f1bbe1818edbda5199adadb5bff85 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Sat, 2 Feb 2019 03:48:17 +0000 Subject: [PATCH] web: clear status when changing tenant This change improves the status reducer to clear the status for the tenant set action. This prevent incorrect status and flickering to occur when changing tenant. Change-Id: Ie910e83eba264a6668fa5fce7ebf71fe6c8cc36b --- web/src/reducers/status.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/src/reducers/status.js b/web/src/reducers/status.js index 33d0ecf2ac..a277947d8e 100644 --- a/web/src/reducers/status.js +++ b/web/src/reducers/status.js @@ -12,6 +12,7 @@ // License for the specific language governing permissions and limitations // under the License. +import { TENANT_SET } from '../actions/tenant' import { STATUS_FETCH_FAIL, STATUS_FETCH_REQUEST, @@ -23,6 +24,11 @@ export default (state = { status: null }, action) => { switch (action.type) { + case TENANT_SET: + return { + isFetching: false, + status: null, + } case STATUS_FETCH_REQUEST: return { isFetching: true,