From 5ff64a10d094bd6884ba0f444d0e2c2b7f2c5d06 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Mon, 2 Jan 2023 13:09:58 +0530 Subject: [PATCH] Replaced with MAP --- src/OnboardingSPA/components/MiniPreview/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/OnboardingSPA/components/MiniPreview/index.js b/src/OnboardingSPA/components/MiniPreview/index.js index d67597062..a49f3e638 100644 --- a/src/OnboardingSPA/components/MiniPreview/index.js +++ b/src/OnboardingSPA/components/MiniPreview/index.js @@ -70,16 +70,14 @@ const MiniPreview = ({ title, desc, icon, socialData, isSocialFormOpen, setIsSoc } function socialIconList() { - var socialIconList = [] - socialDataset.map( (socialInfo) => { - socialIconList.push( + return socialDataset.map( (socialInfo) => { + return (
setIsSocialFormOpen(!isSocialFormOpen)} className={`browser-content_social_icon ${socialInfo.url ? isValidUrl(socialInfo.url) || '--invalid-url' : '--no-url' }`} style={{ backgroundImage: socialInfo.image }} /> - ) - }) - return socialIconList; + ) + }) } return (