fix: error handling is updated in trace

This commit is contained in:
Palash gupta 2022-05-10 17:09:39 +05:30
parent 53528f1045
commit 80c0b5621d
No known key found for this signature in database
GPG Key ID: 8FD05AE6F9150AD6
2 changed files with 14 additions and 1 deletions

View File

@ -34,7 +34,7 @@ function TraceGraph(): JSX.Element {
);
}
if (loading || payload === undefined) {
if (loading) {
return (
<Container>
<Spinner height="20vh" size="small" tip="Loading..." />

View File

@ -7,6 +7,7 @@ import AppActions from 'types/actions';
import {
UPDATE_ALL_FILTERS,
UPDATE_TRACE_FILTER_LOADING,
UPDATE_TRACE_GRAPH_LOADING,
} from 'types/actions/trace';
import { GlobalReducer } from 'types/reducer/globalTime';
import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace';
@ -183,6 +184,12 @@ export const GetInitialTraceFilter = (
filterLoading: false,
},
});
dispatch({
type: UPDATE_TRACE_GRAPH_LOADING,
payload: {
loading: false,
},
});
} catch (error) {
console.log(error);
dispatch({
@ -191,6 +198,12 @@ export const GetInitialTraceFilter = (
filterLoading: false,
},
});
dispatch({
type: UPDATE_TRACE_GRAPH_LOADING,
payload: {
loading: false,
},
});
}
};
};