Fixed a bug in the LogArea.jsx
This commit is contained in:
parent
1f089f08b7
commit
288f33d693
@ -10,12 +10,14 @@ export const LogArea = ({steps, completedSteps, failedStep}) => (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="log-items">
|
<div className="log-items">
|
||||||
{steps.map((step) => {
|
{steps.map((step, index) => {
|
||||||
|
const stepBefore = index > 0 ? steps[index - 1] : {step: -1};
|
||||||
|
|
||||||
return <div className={"log-item" + (completedSteps.includes(step.step) ? " icon-success" : "")
|
return <div className={"log-item" + (completedSteps.includes(step.step) ? " icon-success" : "")
|
||||||
+ (failedStep === step.step ? " icon-failed" : "")}
|
+ (failedStep === step.step ? " icon-failed" : "")}
|
||||||
id={step.step} key={step.step}>
|
id={step.step} key={step.step}>
|
||||||
{failedStep === step.step ? <FontAwesomeIcon icon={faWarning}/>
|
{failedStep === step.step ? <FontAwesomeIcon icon={faWarning}/>
|
||||||
: (!completedSteps.includes(step.step) && completedSteps.includes(step.step - 1))
|
: (!completedSteps.includes(step.step) && completedSteps.includes(stepBefore.step))
|
||||||
? <FontAwesomeIcon icon={faCircleNotch} spin={true} className="icon-small"/>
|
? <FontAwesomeIcon icon={faCircleNotch} spin={true} className="icon-small"/>
|
||||||
: <FontAwesomeIcon icon={faCheck}/>}
|
: <FontAwesomeIcon icon={faCheck}/>}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user