Browse Source

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
tags/3.6.0
Tristan Cacqueray 5 months ago
parent
commit
93cc8d274a
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      web/src/reducers/status.js

+ 6
- 0
web/src/reducers/status.js View File

@@ -12,6 +12,7 @@
12 12
 // License for the specific language governing permissions and limitations
13 13
 // under the License.
14 14
 
15
+import { TENANT_SET } from '../actions/tenant'
15 16
 import {
16 17
   STATUS_FETCH_FAIL,
17 18
   STATUS_FETCH_REQUEST,
@@ -23,6 +24,11 @@ export default (state = {
23 24
   status: null
24 25
 }, action) => {
25 26
   switch (action.type) {
27
+    case TENANT_SET:
28
+      return {
29
+        isFetching: false,
30
+        status: null,
31
+      }
26 32
     case STATUS_FETCH_REQUEST:
27 33
       return {
28 34
         isFetching: true,

Loading…
Cancel
Save