Skip to content

Commit

Permalink
Remove duplicate speakers (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
PUNEET-EMM authored Nov 9, 2023
1 parent de9514a commit a1d9736
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a1d9736

Please sign in to comment.