From c26669bd5a864c6c4560d4ad3b06835170ba156b Mon Sep 17 00:00:00 2001 From: polatengin Date: Tue, 21 Jul 2020 18:05:30 +0300 Subject: [PATCH] extra dom element removed --- .../components/feedbackCarousel.tsx | 60 +++++++++---------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/RetrospectiveExtension.Frontend/components/feedbackCarousel.tsx b/RetrospectiveExtension.Frontend/components/feedbackCarousel.tsx index e7aa7a2..4c9c746 100644 --- a/RetrospectiveExtension.Frontend/components/feedbackCarousel.tsx +++ b/RetrospectiveExtension.Frontend/components/feedbackCarousel.tsx @@ -63,38 +63,36 @@ export default class FeedbackCarousel extends React.Component - - {this.props.feedbackColumnPropsList.map((columnProps) => { - const mainCardCount = columnProps.columnItems.filter((columnItem) => !columnItem.feedbackItem.parentFeedbackItemId).length; + + {this.props.feedbackColumnPropsList.map((columnProps) => { + const mainCardCount = columnProps.columnItems.filter((columnItem) => !columnItem.feedbackItem.parentFeedbackItemId).length; - return - {mainCardCount === 1 && - this.renderSingleFeedbackCarouselItem(columnProps) - } - {mainCardCount >= 2 && - // @ts-ignore TS2786 - - {React.Children.map(this.renderFeedbackCarouselItems(columnProps), (child: React.ReactElement) => { - return ( -
- {child} -
- ); - })} -
- } -
- })} -
- + return + {mainCardCount === 1 && + this.renderSingleFeedbackCarouselItem(columnProps) + } + {mainCardCount >= 2 && + // @ts-ignore TS2786 + + {React.Children.map(this.renderFeedbackCarouselItems(columnProps), (child: React.ReactElement) => { + return ( +
+ {child} +
+ ); + })} +
+ } +
+ })} +
); } } \ No newline at end of file