From cfc6174199b1c7a05c6845b30b8469a840498a49 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Wed, 14 Feb 2024 14:33:44 +0100 Subject: [PATCH] fix: remove useMemo --- .../AttachmentCarousel/Pager/index.tsx | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/components/Attachments/AttachmentCarousel/Pager/index.tsx b/src/components/Attachments/AttachmentCarousel/Pager/index.tsx index ae83ee0b00ed..8704584c3e18 100644 --- a/src/components/Attachments/AttachmentCarousel/Pager/index.tsx +++ b/src/components/Attachments/AttachmentCarousel/Pager/index.tsx @@ -137,24 +137,20 @@ function AttachmentCarouselPager({items, activeSource, initialPage, onPageSelect [], ); - const carouselItems = useMemo( - () => - items.map((item, index) => ( - - - - )), - [activePageIndex, activeSource, items, styles.flex1], - ); + const carouselItems = items.map((item, index) => ( + + + + )); return (