Offering
-
+
{match.myDetails.offeringSkill}
+ {mySkillVerified === true && }
+ {mySkillVerified === false && }
You'll teach this skill
@@ -441,8 +469,10 @@ const MatchDetailsModal: React.FC = ({ match, currentUse
They Offer
-
+
{match.otherUser.offeringSkill}
+ {otherSkillVerified === true && }
+ {otherSkillVerified === false && }
{match.otherUser.firstName} will teach you this
diff --git a/src/components/User/DashboardContent/MatchesContent.tsx b/src/components/User/DashboardContent/MatchesContent.tsx
index 3f87758..7e48f3a 100644
--- a/src/components/User/DashboardContent/MatchesContent.tsx
+++ b/src/components/User/DashboardContent/MatchesContent.tsx
@@ -527,6 +527,7 @@ const MatchesPage = () => {
key={match.id}
match={match}
onClick={() => viewMatchDetails(match)}
+ currentUserId={currentUserId}
/>
))}
diff --git a/src/services/skillServiceAdmin.ts b/src/services/skillServiceAdmin.ts
new file mode 100644
index 0000000..fbf2139
--- /dev/null
+++ b/src/services/skillServiceAdmin.ts
@@ -0,0 +1,27 @@
+// Service to fetch another user's skills by userId (for admin or cross-user lookups)
+import { ApiResponse, UserSkill } from '@/types/userSkill';
+
+export const getUserSkillsByUserId = async (userId: string): Promise
> => {
+ try {
+ const response = await fetch(`/api/userskillfetch?userId=${userId}`, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ });
+ const apiResponse = await response.json();
+ if (apiResponse.success && apiResponse.categories) {
+ // Flatten all skills from all categories
+ const allSkills = apiResponse.categories.flatMap((cat: any) => cat.skills.map((s: any) => ({
+ ...s,
+ categoryId: cat.categoryId,
+ categoryName: cat.categoryName,
+ })));
+ return { success: true, data: allSkills };
+ }
+ return { success: false, message: apiResponse.message || 'Failed to fetch user skills' };
+ } catch (error) {
+ console.error('Error fetching user skills by userId:', error);
+ return { success: false, message: 'Failed to fetch user skills' };
+ }
+};
From c41e5bcea1586928712a99d54611a61dd0051d52 Mon Sep 17 00:00:00 2001
From: AdithaBuwaneka
Date: Tue, 22 Jul 2025 17:20:07 +0530
Subject: [PATCH 2/3] feat: center status display in MatchCard footer and
remove quick action button
---
.../Dashboard/matches/MatchCard.tsx | 31 +++++--------------
1 file changed, 7 insertions(+), 24 deletions(-)
diff --git a/src/components/Dashboard/matches/MatchCard.tsx b/src/components/Dashboard/matches/MatchCard.tsx
index 557969e..0c278b7 100644
--- a/src/components/Dashboard/matches/MatchCard.tsx
+++ b/src/components/Dashboard/matches/MatchCard.tsx
@@ -259,32 +259,15 @@ const MatchCard: React.FC = ({ match, onClick, currentUserId })
- {/* Card Footer */}
+ {/* Card Footer - Centered status only */}