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:
parent
b4e6247ab5
commit
93cc8d274a
|
@ -12,6 +12,7 @@
|
||||||
// License for the specific language governing permissions and limitations
|
// License for the specific language governing permissions and limitations
|
||||||
// under the License.
|
// under the License.
|
||||||
|
|
||||||
|
import { TENANT_SET } from '../actions/tenant'
|
||||||
import {
|
import {
|
||||||
STATUS_FETCH_FAIL,
|
STATUS_FETCH_FAIL,
|
||||||
STATUS_FETCH_REQUEST,
|
STATUS_FETCH_REQUEST,
|
||||||
|
@ -23,6 +24,11 @@ export default (state = {
|
||||||
status: null
|
status: null
|
||||||
}, action) => {
|
}, action) => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
|
case TENANT_SET:
|
||||||
|
return {
|
||||||
|
isFetching: false,
|
||||||
|
status: null,
|
||||||
|
}
|
||||||
case STATUS_FETCH_REQUEST:
|
case STATUS_FETCH_REQUEST:
|
||||||
return {
|
return {
|
||||||
isFetching: true,
|
isFetching: true,
|
||||||
|
|
Loading…
Reference in New Issue