How can the step component in react make the state=2 progress bar blue and the state=1 progress bar gray according to the data sent from the background?

according to the data sent from the background, the state=2 progress bar is blue state=1 progress bar is gray
blue represents completed gray represents completion
will be appreciated!

render(){
        const {visible,onCancel,auditRuleList} = this.props;
        console.log(auditRuleList)
        const dataSource = auditRuleList ? (auditRuleList.result && Array.isArray(auditRuleList.result))? auditRuleList.result.map((item,index)=><Step
            key={item.id} title={item.name} description={moment(item.time).format("YYYY/MM/DD")}/>) :[]:[];
        return (
            <Modal
                visible={visible}
                title={""}
                width="80vw"
                onCancel={onCancel}
                onOk={onCancel}
            >

            <Steps progressDot current={1}>
                {dataSource}
            </Steps>

            </Modal>
        );
    }
}

Apr.05,2021

state and class cooperate



  state = {
    status: '',
  };

  componentWillMount() {
  // ... status
    const status = 2
    this.setState({
      status,
    })
  }
const { status } = this.state;
...
<Steps current={status}>
  <Steps.Step title="Finished" description="This is a description." />
  <Steps.Step title="In Progress" description="This is a description." />
  <Steps.Step title="Waiting" description="This is a description." />
</Steps>

state remember to correspond to the current step

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e483d5-439c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e483d5-439c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?