Fix horizontal scroll on league page from long event names

Add min-w-0 to Link wrapper and overflow-hidden to SportRow flex
container so grid/flex children can shrink below intrinsic content
size, allowing truncate to work properly on mobile.
This commit is contained in:
Chris Parsons 2026-04-30 10:45:43 -07:00
parent 437ac2ce24
commit 7099a8770a
2 changed files with 3 additions and 2 deletions

View file

@ -7,6 +7,7 @@ Brackt.com is a fantasy sports drafting platform (React Router 7 + SSR, Socket.I
```bash
npm run dev # development with HMR
npm run typecheck # TypeScript check
npm run lint # lint check (run alongside typecheck after edits)
npm run db:generate # generate Drizzle migration
npm run db:migrate # apply migrations
npm run test:run # unit tests (once)

View file

@ -169,7 +169,7 @@ function SportRow({
const inner = (
<div
className={`group flex gap-3 rounded-lg px-3 py-2.5 transition-colors ${
className={`group flex gap-3 rounded-lg px-3 py-2.5 overflow-hidden transition-colors ${
isCompleted
? "hover:bg-white/[0.04] opacity-70 hover:opacity-100"
: "hover:bg-white/[0.06]"
@ -206,7 +206,7 @@ function SportRow({
return (
<Link
to={`/leagues/${leagueId}/sports-seasons/${item.id}`}
className="block"
className="block min-w-0"
aria-label={`${item.sportName}${item.seasonName}`}
>
{inner}