Inbox: do not print raw To-addresses in the source chip

When no job board matches, the chip now says Email instead of the
full address; the address stays in the hover title and the opened
message. Board/referral chips are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/39/head
Talha Ahmed 2026-08-31 14:39:48 +05:00
parent 4b93246d43
commit 629554e6f6
1 changed files with 7 additions and 2 deletions

View File

@ -225,10 +225,15 @@ async function fetchFormDetail(recordId) {
function SourceChip({ item }) { function SourceChip({ item }) {
// The dot carries the partner's brand colour; the label uses theme text // The dot carries the partner's brand colour; the label uses theme text
// 11px labels in the partner colour failed AA in both themes. // 11px labels in the partner colour failed AA in both themes.
// When no board matched, `source` is the raw To-address; keep it out of the
// chip show "Email", and leave the address to the tooltip and the opened
// message.
const source = String(item.source ?? '')
const label = source.includes('@') ? 'Email' : source
return ( return (
<span className="source-chip" style={{ '--chip': item.sourceMeta?.color }} title={item.source}> <span className="source-chip" style={{ '--chip': item.sourceMeta?.color }} title={source}>
<span className="source-dot" /> <span className="source-dot" />
<span className="source-chip-label">{item.source}</span> <span className="source-chip-label">{label}</span>
</span> </span>
) )
} }