mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
get versions on each rerender
This commit is contained in:
parent
3a72470208
commit
b09c15ff1b
|
@ -79,15 +79,15 @@ export default class VersionNumbers extends PureComponent<
|
||||||
// for canceling axios requests
|
// for canceling axios requests
|
||||||
public signal = axios.CancelToken.source()
|
public signal = axios.CancelToken.source()
|
||||||
|
|
||||||
public async componentDidMount() {
|
|
||||||
this.getOceanVersions()
|
|
||||||
this.getFaucetVersion()
|
|
||||||
}
|
|
||||||
|
|
||||||
public componentWillUnmount() {
|
public componentWillUnmount() {
|
||||||
this.signal.cancel()
|
this.signal.cancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public componentWillReceiveProps() {
|
||||||
|
this.getOceanVersions()
|
||||||
|
this.getFaucetVersion()
|
||||||
|
}
|
||||||
|
|
||||||
private async getOceanVersions() {
|
private async getOceanVersions() {
|
||||||
const { ocean } = this.context
|
const { ocean } = this.context
|
||||||
// wait until ocean object is properly populated
|
// wait until ocean object is properly populated
|
||||||
|
|
Loading…
Reference in New Issue
Block a user