-
{match.matchedUser.name}
-
{match.matchedUser.email}
+ {match.matchedUser ? (
+
+
+
+
{match.matchedUser.name}
+
{match.matchedUser.email}
+
+
+
+
Match Reasons:
+ {match.matchReason.map((reason, i) => (
+
+
+ {reason}
+
+ ))}
-
-
Match Reasons:
- {match.matchReason.map((reason, i) => (
-
-
- {reason}
-
- ))}
+ ) : (
+
+ No matching user found
-
- ) : (
-
- No matching user found
-
- )}
+ )}
- {/* Display warning when match is current user */}
- {isUserSelf && (
-
- Cannot edit your own role
-
- )}
+ {/* Display warning when match is current user */}
+ {isUserSelf && (
+
+ Cannot edit your own role
+
+ )}
- {/* Only show approval message for non-self users with confidence < 70 */}
- {match.confidence < 70 && match.matchedUser && !isUserSelf && (
-
- {match.isApproved ? '↑ Click to remove approval ↑' : '↑ Click to approve match ↑'}
-
- )}
-
- );
- })}
+ {/* Only show approval message for non-self users with confidence < 70 */}
+ {match.confidence < 70 && match.matchedUser && !isUserSelf && (
+
+ {match.isApproved ? '↑ Click to remove approval ↑' : '↑ Click to approve match ↑'}
+
+ )}
+