fix: remove last non-existing step app icon
This commit is contained in:
@@ -12,10 +12,9 @@ export default function FlowAppIcons(props: FlowAppIconsProps) {
|
|||||||
const { steps } = props;
|
const { steps } = props;
|
||||||
const stepsCount = steps.length;
|
const stepsCount = steps.length;
|
||||||
const firstStep = steps[0];
|
const firstStep = steps[0];
|
||||||
const lastStep = steps[stepsCount - 1];
|
const lastStep = steps.length > 1 && steps[stepsCount - 1];
|
||||||
const intermeaditeStepCount = stepsCount - 2;
|
const intermeaditeStepCount = stepsCount - 2;
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppIcon
|
<AppIcon
|
||||||
@@ -27,11 +26,11 @@ export default function FlowAppIcons(props: FlowAppIconsProps) {
|
|||||||
|
|
||||||
{intermeaditeStepCount > 0 && <IntermediateStepCount count={intermeaditeStepCount} />}
|
{intermeaditeStepCount > 0 && <IntermediateStepCount count={intermeaditeStepCount} />}
|
||||||
|
|
||||||
<AppIcon
|
{lastStep && <AppIcon
|
||||||
name=" "
|
name=" "
|
||||||
variant="rounded"
|
variant="rounded"
|
||||||
url={lastStep.iconUrl}
|
url={lastStep.iconUrl}
|
||||||
/>
|
/>}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user