fix(tradein): white-label fallback shows client initial, not MeraMark (#1081)
All checks were successful
CI / changes (push) Successful in 9s
CI / backend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 6s
CI / backend-tests (pull_request) Has been skipped

In the no-logo_url fallback branch replace <MeraMark /> with the first
letter of the client brand name so our glyph never appears in a
white-label header.  Default (brand===null) branch is unchanged.
Add inline comments in OfferCard to guard Trade-In mechanic strings
against unintentional rebrand sweep (#1079).
This commit is contained in:
bot-backend 2026-06-06 22:06:28 +03:00
parent 9b9c6e85d3
commit 19b28e3e13
2 changed files with 6 additions and 1 deletions

View file

@ -68,6 +68,7 @@ export function OfferCard({ estimate, brandSlug }: Props) {
</div>
{/* ── Прайм-блок: ваша выгода ── */}
{/* intentional: «Trade-In» здесь = механика сделки, не имя бренда (rebrand #1079) */}
<div className="offer-benefit">
<div className="ob-label">Ваша выгода через Trade-In</div>
<div className="ob-value mono">
@ -83,6 +84,7 @@ export function OfferCard({ estimate, brandSlug }: Props) {
<thead>
<tr>
<th>Статья расходов</th>
{/* intentional: «Trade-In» здесь = механика сделки, не имя бренда (rebrand #1079) */}
<th className="col-trade">Через Trade-In</th>
<th className="col-self">Самостоятельная продажа</th>
</tr>
@ -122,6 +124,7 @@ export function OfferCard({ estimate, brandSlug }: Props) {
<line x1="12" y1="17" x2="12.01" y2="17" />
</svg>
</span>
{/* intentional: «Trade-In» здесь = механика сделки, не имя бренда (rebrand #1079) */}
<div>
Издержки при самостоятельной продаже сопоставимы со скидкой{" "}
<b>{breakdown.totalPctMid.toFixed(0)}%</b> от цены объявления.{" "}

View file

@ -127,8 +127,10 @@ export function Topbar({ active }: TopbarProps) {
className="brand-logo"
/>
) : (
/* #1081 white-label без logo_url: показываем первую букву клиента,
НЕ нашу марку MeraMark бренд не должен утекать в чужой заголовок. */
<>
<span className="brand-mark"><MeraMark /></span>
<span className="brand-mark">{brand.name.slice(0, 1).toUpperCase()}</span>
<span className="brand-product">{brand.name}</span>
</>
)