fix(cabinet): stop long user data overflowing flex rows on mobile

Same flex-overflow class as the Connected-Accounts card — a long
user-controlled string with no truncation pushes its sibling badge/button
out of the card on narrow screens. Found via a scan of the high-risk
screens; fixed with min-w-0 + truncate/break-words on the text column and
shrink-0 on the fixed siblings:
- Balance: promocode-target tariff name vs days-left badge
- ReferralNetwork CampaignDetailPanel: start_parameter + top-referrer username
- ServerManagementSheet: country/server name vs flag emoji
- Contests / Polls: contest/poll title vs prize/reward badge
This commit is contained in:
c0mrade
2026-06-04 23:03:42 +03:00
parent c39c164d51
commit 63863a048b
5 changed files with 30 additions and 26 deletions

View File

@@ -205,9 +205,9 @@ export default function Polls() {
<div className="grid gap-4 sm:grid-cols-2">
{polls.map((poll) => (
<div key={poll.id} className="card">
<div className="flex items-start justify-between">
<div className="flex-1">
<h3 className="text-lg font-semibold">{poll.title}</h3>
<div className="flex items-start justify-between gap-2">
<div className="min-w-0 flex-1">
<h3 className="break-words text-lg font-semibold">{poll.title}</h3>
{poll.description && (
<p className="mt-1 text-sm text-dark-400">{poll.description}</p>
)}
@@ -219,7 +219,7 @@ export default function Polls() {
</div>
</div>
{poll.reward_amount && (
<div className="flex items-center gap-1 text-accent-400">
<div className="flex shrink-0 items-center gap-1 text-accent-400">
<GiftIcon className="h-5 w-5" />
<span className="text-sm font-medium">+{poll.reward_amount}</span>
</div>