From 745b66170912f32768239b5d3895453a78de4b64 Mon Sep 17 00:00:00 2001 From: nessi Date: Fri, 6 Feb 2026 13:24:38 +0100 Subject: [PATCH] Fix email display logic in WinnerBadge component Replaced the conditional display of the winner's email with a more robust logic to show either the trimmed display name or the email. This ensures better handling of cases where the display name is unavailable or matches the email. --- frontend/src/components/WinnerBadge.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/WinnerBadge.jsx b/frontend/src/components/WinnerBadge.jsx index 4bc3e91..8aa4324 100644 --- a/frontend/src/components/WinnerBadge.jsx +++ b/frontend/src/components/WinnerBadge.jsx @@ -22,6 +22,8 @@ export default function WinnerBadge({ winner, winnerEmail }) { (winner?.display_name || "").trim() && winner.email.trim().toLowerCase() !== winner.display_name.trim().toLowerCase(); + const displayName = me ? ((me.display_name || "").trim() || me.email) : ""; + return (
- {winner.email} + {displayName}
)}