From 8a9f1f2325439aecdcfb2ffaa1e4982e30f3e955 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Thu, 19 Mar 2026 17:36:53 +0530 Subject: [PATCH] fix: Deduplicate array values in profile data mapping and ensure specialization cards fill full height. --- src/components/profile/SpecializationCard.tsx | 2 +- src/utils/profileDataMapper.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/profile/SpecializationCard.tsx b/src/components/profile/SpecializationCard.tsx index c8209a6..2f28b13 100644 --- a/src/components/profile/SpecializationCard.tsx +++ b/src/components/profile/SpecializationCard.tsx @@ -29,7 +29,7 @@ export function SpecializationCard({ }; return ( -
+
{icon}

{title}

diff --git a/src/utils/profileDataMapper.ts b/src/utils/profileDataMapper.ts index de97f5b..b3aac29 100644 --- a/src/utils/profileDataMapper.ts +++ b/src/utils/profileDataMapper.ts @@ -347,7 +347,8 @@ function valueToStringArray(value: unknown): string[] { if (!value) return []; if (Array.isArray(value)) { - return value.map(v => String(v)).filter(v => v.trim() !== ''); + // Deduplicate values + return [...new Set(value.map(v => String(v)).filter(v => v.trim() !== ''))]; } if (typeof value === 'string' && value.trim()) {