remove legacy methods from UriIndicator component
This commit is contained in:
parent
f8946687e9
commit
20ef65540d
1 changed files with 11 additions and 13 deletions
|
@ -16,21 +16,19 @@ type Props = {
|
||||||
};
|
};
|
||||||
|
|
||||||
class UriIndicator extends React.PureComponent<Props> {
|
class UriIndicator extends React.PureComponent<Props> {
|
||||||
componentWillMount() {
|
componentDidMount() {
|
||||||
this.resolve(this.props);
|
const { isResolvingUri, resolveUri, uri, claim } = this.props;
|
||||||
}
|
if (!isResolvingUri && !claim && uri) {
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps: Props) {
|
|
||||||
this.resolve(nextProps);
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve = (props: Props) => {
|
|
||||||
const { isResolvingUri, resolveUri, claim, uri } = props;
|
|
||||||
|
|
||||||
if (!isResolvingUri && claim === undefined && uri) {
|
|
||||||
resolveUri(uri);
|
resolveUri(uri);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
componentDidUpdate(prevProps: Props) {
|
||||||
|
const { isResolvingUri, resolveUri, claim, uri } = this.props;
|
||||||
|
if (!isResolvingUri && uri && !claim) {
|
||||||
|
resolveUri(uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { link, isResolvingUri, claim } = this.props;
|
const { link, isResolvingUri, claim } = this.props;
|
||||||
|
|
Loading…
Reference in a new issue