From 46a81a643551535a3f0ecf3a3747906f6b3d9be1 Mon Sep 17 00:00:00 2001 From: Chris Parsons <438676+chrisparsons83@users.noreply.github.com> Date: Wed, 6 May 2026 17:03:34 -0700 Subject: [PATCH] Fix avatar display bugs in navbar, standings, and draft views (#387) - Remove rounded clipping on navbar user avatar button (was showing dark circular background) - Fix "My Avatar" preview in team settings showing circular instead of square shape - Pass owner avatar data through to TeamAvatar in standings, draft room, and draft board so teams with avatarType="owner" correctly show the user's avatar instead of the generated flag - Consolidate user lookups in draft board loader to avoid duplicate DB queries - Fix DraftSlotWithTeam interface to use RawFlagConfig type and include logoUrl/flagConfig/avatarType fields Co-authored-by: Claude Sonnet 4.6 --- app/components/DraftGrid.tsx | 4 +++- app/components/UserMenu.tsx | 2 +- app/components/draft/DraftGridSection.tsx | 4 +++- app/components/league/StandingsPreview.tsx | 14 +++++++++++- app/components/ui/AvatarEditor.tsx | 4 ++-- app/models/draft-slot.ts | 7 ++++++ .../$leagueId.draft-board.$seasonId.tsx | 22 ++++++++++++++++--- .../leagues/$leagueId.draft.$seasonId.tsx | 14 +++++++++++- app/routes/leagues/$leagueId.server.ts | 6 +++++ app/routes/leagues/$leagueId.tsx | 6 +++++ 10 files changed, 73 insertions(+), 10 deletions(-) diff --git a/app/components/DraftGrid.tsx b/app/components/DraftGrid.tsx index f9d338a..0dfc599 100644 --- a/app/components/DraftGrid.tsx +++ b/app/components/DraftGrid.tsx @@ -7,7 +7,7 @@ import { import { DraftPickCell, type CoronaState } from "~/components/draft/DraftPickCell"; import { TeamAvatar } from "~/components/TeamAvatar"; import type { SeasonStatus } from "~/models/season"; -import type { RawFlagConfig } from "~/lib/flag-types"; +import type { AvatarData, RawFlagConfig } from "~/lib/flag-types"; interface DraftCell { pickNumber: number; @@ -26,6 +26,7 @@ interface DraftGridProps { logoUrl?: string | null; flagConfig?: RawFlagConfig | null; avatarType?: string | null; + ownerAvatarData?: AvatarData | null; }; }>; draftGrid: Array>; @@ -84,6 +85,7 @@ export function DraftGrid({ logoUrl={slot.team.logoUrl} flagConfig={slot.team.flagConfig} avatarType={slot.team.avatarType} + ownerAvatarData={slot.team.ownerAvatarData} size="lg" /> diff --git a/app/components/UserMenu.tsx b/app/components/UserMenu.tsx index d8f3d12..4c74e52 100644 --- a/app/components/UserMenu.tsx +++ b/app/components/UserMenu.tsx @@ -32,7 +32,7 @@ export function UserMenu({ return ( -