diff --git a/client/pages/DevelopersDirectory.tsx b/client/pages/DevelopersDirectory.tsx index 7c2df2e0..dfe757d0 100644 --- a/client/pages/DevelopersDirectory.tsx +++ b/client/pages/DevelopersDirectory.tsx @@ -108,49 +108,128 @@ interface DeveloperCardProps { const DeveloperCard = ({ profile }: DeveloperCardProps) => { const realmStyle = realmBadgeStyles[profile.user_type] || "bg-aethex-500 text-white"; + const fallbackBanner = realmBannerFallbacks[profile.user_type] || + "from-slate-900 via-slate-800 to-slate-900"; const isGodMode = (profile.level ?? 1) >= 100; const passportHref = profile.username ? `/passport/${profile.username}` : `/passport/${profile.id}`; + const name = profile.full_name || profile.username || "AeThex Explorer"; + const initials = name + .split(" ") + .filter(Boolean) + .map((segment) => segment[0]?.toUpperCase()) + .join("") + .slice(0, 2) || "AE"; + const availabilityLabel = getAvailabilityLabel(profile as any); + const availabilityStyles = getAvailabilityStyles(availabilityLabel); + const experienceLabel = profile.experience_level + ? profile.experience_level.replace("_", " ") + : null; + return ( - - -
-
- - {profile.user_type.replace("_", " ")} - - {isGodMode && ( - - GOD Mode - - )} + +
+
+
+
+ +
+
+ + + + {initials} + + +
+
+ + {profile.user_type.replace("_", " ")} + + {experienceLabel && ( + + {experienceLabel} + + )} + {isGodMode && ( + + GOD Mode + + )} +
+ {name} + {profile.email && ( + + {profile.email} + + )} +
+ {profile.location && ( + + {profile.location} + + )} + + + {availabilityLabel} + +
+
Level {profile.level ?? 1}
- - {profile.full_name || profile.username || "AeThex Explorer"} - - {profile.email && ( - - {profile.email} - - )}
- -
+ + {profile.bio && ( +

+ {profile.bio} +

+ )} +
XP
-
{profile.total_xp ?? 0}
+
+ {profile.total_xp ?? 0} +
@@ -160,9 +239,17 @@ const DeveloperCard = ({ profile }: DeveloperCardProps) => { {(profile as any)?.loyalty_points ?? 0}
+
+
+ Streak +
+
+ {(profile.current_streak ?? 0).toLocaleString()} days +
+
- {(profile as any)?.skills?.slice(0, 3)?.map((skill: string) => ( + {(profile as any)?.skills?.slice(0, 4)?.map((skill: string) => ( { {skill} ))} - {((profile as any)?.skills?.length || 0) > 3 && ( + {((profile as any)?.skills?.length || 0) > 4 && ( - +{((profile as any)?.skills?.length || 0) - 3} + +{((profile as any)?.skills?.length || 0) - 4} )}