Skip to content
Snippets Groups Projects
Commit 40f7c5d1 authored by meskio's avatar meskio :tent:
Browse files

Refetch if url changes

parent a973dc19
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ class Fetcher extends React.Component {
this.state = {
isLoading: true,
error: null,
url: null,
};
}
......@@ -53,6 +54,12 @@ class Fetcher extends React.Component {
}
render() {
// A hack to get it to fetch when url changes
if (this.state.url !== this.props.url) {
this.setState({ url: this.props.url });
this.fetch();
}
if (this.state.isLoading) {
return (
<Row className="justify-content-md-center">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment