Commit d929c465 authored by Mahdi Mahmoudy's avatar Mahdi Mahmoudy
Browse files

now renders the mapping page, even if the pairwise alignment api call fails

parent 6f0072a9
......@@ -52,6 +52,7 @@ class Alignment extends Component {
this.setState({
loading: true,
apiError: false,
});
axios
......@@ -80,7 +81,11 @@ class Alignment extends Component {
})
.catch((e) => {
console.log(e);
history.push(`${BASE_URL}/error`);
this.setState({
apiError: true,
loading: false,
});
});
};
......@@ -265,13 +270,21 @@ class Alignment extends Component {
render() {
const {
alignments, loading, isTooLong,
alignments, loading, isTooLong, apiError,
} = this.state;
if (loading) {
return <LoadingSpinner />;
}
if (apiError) {
return (
<div className="callout">
<em>An error happened during the loading of this alignment.</em>
</div>
);
}
if (isTooLong) {
return (
<div className="callout">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment