mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
Follows up on https://github.com/Unleash/unleash/pull/4853 to add Biome to the frontend as well.  Added a few `biome-ignore` to speed up the process but we may want to check and fix them in the future.
32 lines
990 B
TypeScript
32 lines
990 B
TypeScript
import { Fragment } from 'react';
|
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
|
import { StrategySeparator } from 'component/common/StrategySeparator/StrategySeparator';
|
|
import { SegmentItem } from '../../../../common/SegmentItem/SegmentItem';
|
|
import { ISegment } from 'interfaces/segment';
|
|
|
|
interface IFeatureOverviewSegmentProps {
|
|
segments?: ISegment[];
|
|
}
|
|
|
|
export const FeatureOverviewSegment = ({
|
|
segments,
|
|
}: IFeatureOverviewSegmentProps) => {
|
|
if (!segments || segments.length === 0) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
{segments.map((segment, index) => (
|
|
<Fragment key={segment.id}>
|
|
<ConditionallyRender
|
|
condition={index > 0}
|
|
show={<StrategySeparator text='AND' />}
|
|
/>
|
|
<SegmentItem segment={segment} />
|
|
</Fragment>
|
|
))}
|
|
</>
|
|
);
|
|
};
|