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 stepsCount = steps.length;
|
||||
const firstStep = steps[0];
|
||||
const lastStep = steps[stepsCount - 1];
|
||||
const lastStep = steps.length > 1 && steps[stepsCount - 1];
|
||||
const intermeaditeStepCount = stepsCount - 2;
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<AppIcon
|
||||
@@ -27,11 +26,11 @@ export default function FlowAppIcons(props: FlowAppIconsProps) {
|
||||
|
||||
{intermeaditeStepCount > 0 && <IntermediateStepCount count={intermeaditeStepCount} />}
|
||||
|
||||
<AppIcon
|
||||
{lastStep && <AppIcon
|
||||
name=" "
|
||||
variant="rounded"
|
||||
url={lastStep.iconUrl}
|
||||
/>
|
||||
/>}
|
||||
</>
|
||||
)
|
||||
};
|
||||
|
Reference in New Issue
Block a user