remove legacy methods from UriIndicator component

This commit is contained in:
btzr-io 2019-06-12 22:33:47 -06:00
parent f8946687e9
commit 20ef65540d

View file

@ -16,21 +16,19 @@ type Props = {
};
class UriIndicator extends React.PureComponent<Props> {
componentWillMount() {
this.resolve(this.props);
}
componentWillReceiveProps(nextProps: Props) {
this.resolve(nextProps);
}
resolve = (props: Props) => {
const { isResolvingUri, resolveUri, claim, uri } = props;
if (!isResolvingUri && claim === undefined && uri) {
componentDidMount() {
const { isResolvingUri, resolveUri, uri, claim } = this.props;
if (!isResolvingUri && !claim && uri) {
resolveUri(uri);
}
};
}
componentDidUpdate(prevProps: Props) {
const { isResolvingUri, resolveUri, claim, uri } = this.props;
if (!isResolvingUri && uri && !claim) {
resolveUri(uri);
}
}
render() {
const { link, isResolvingUri, claim } = this.props;