[Synthetics] Fix step details current step edge case (#150687)

## Summary

Fixes https://github.com/elastic/kibana/issues/150612
This commit is contained in:
Shahzad 2023-02-09 15:40:52 +01:00 committed by GitHub
parent 30745e236a
commit 38cb7b3fd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,10 +34,6 @@ export const StepDetailPage = () => {
useStepDetailsBreadcrumbs();
const activeStep = data?.steps?.find(
(step) => step.synthetics?.step?.index === Number(stepIndex)
);
const dispatch = useDispatch();
useEffect(() => {
@ -51,7 +47,7 @@ export const StepDetailPage = () => {
return (
<>
<ErrorCallOut step={activeStep} />
<ErrorCallOut step={currentStep} />
{data?.details?.journey?.config_id && (
<MonitorDetailsLinkPortal
configId={data.details.journey.config_id}
@ -109,7 +105,7 @@ export const StepDetailPage = () => {
<WaterfallChartContainer
checkGroup={checkGroupId}
stepIndex={Number(stepIndex)}
activeStep={activeStep}
activeStep={currentStep}
/>
)}
</>