github.com/argoproj/argo-cd@v1.8.7/ui/src/app/applications/components/application-resource-tree/node-update-animation.tsx (about)

     1  import * as React from 'react';
     2  
     3  export class NodeUpdateAnimation extends React.PureComponent<{resourceVersion: string}, {ready: boolean}> {
     4      constructor(props: {resourceVersion: string}) {
     5          super(props);
     6          this.state = {ready: false};
     7      }
     8  
     9      public render() {
    10          return this.state.ready && <div key={this.props.resourceVersion} className='application-resource-tree__node-animation' />;
    11      }
    12  
    13      public componentDidUpdate(prevProps: {resourceVersion: string}) {
    14          if (prevProps.resourceVersion && this.props.resourceVersion !== prevProps.resourceVersion) {
    15              this.setState({ready: true});
    16          }
    17      }
    18  }