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
This commit is contained in:
Tristan Cacqueray 2019-02-02 03:48:17 +00:00
parent b4e6247ab5
commit 93cc8d274a
1 changed files with 6 additions and 0 deletions

View File

@ -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,