From a1d97367ce5886334b38216cbff8d537bb9c6802 Mon Sep 17 00:00:00 2001 From: PUNEET-EMM <98829227+PUNEET-EMM@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:35:57 +0530 Subject: [PATCH] Remove duplicate speakers (#244) --- pages/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/index.js b/pages/index.js index 99e09c50..b8dd2404 100644 --- a/pages/index.js +++ b/pages/index.js @@ -35,6 +35,11 @@ export default function Home() { speakers[0].lists.push(...speaker.lists); } }); + const list = speakers[0].lists.filter((obj, index) => { + return index === speakers[0].lists.findIndex(o => obj.name=== o.name); + }); + speakers[0].lists =[...list]; + useEffect(() => { setCity(speakers[0]); setSpeakersList(speakers[0].lists);