From bcf79a94982ec888d84c5f80b307cc8bb21e527e Mon Sep 17 00:00:00 2001 From: Guilherme Baufaker Date: Tue, 2 Apr 2024 01:21:58 -0300 Subject: [PATCH] fixed cids include function --- components/ui/MyInfo.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/ui/MyInfo.tsx b/components/ui/MyInfo.tsx index 2275e59..6f0c1f4 100644 --- a/components/ui/MyInfo.tsx +++ b/components/ui/MyInfo.tsx @@ -420,7 +420,14 @@ function MyInfo() {
  • { - setCids([...cids, cid]); + if ( + !cids.find((c) => + (c as { full_code: string }).full_code === + cid.full_code + ) + ) { + setCids([...cids, cid]); + } }} > {cid.full_code} - {cid.name}