Fix draft Summary tab showing wrong avatar for teams without custom logos (#453)

DraftSummaryView was not declaring or forwarding ownerAvatarData, so
TeamAvatar fell back to a generated flag instead of the owner's avatar.
DraftGrid and DraftGridSection already threaded ownerAvatarData correctly;
this makes the Summary tab consistent. No route changes needed — the loader
already enriches draftSlots with ownerAvatarData.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chris Parsons 2026-05-20 00:02:19 -07:00 committed by GitHub
parent ea125e0d5e
commit 80973d3212
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,7 @@
import { memo, useMemo, Fragment } from "react";
import { TeamAvatar } from "~/components/TeamAvatar";
import { type DraftPick, groupPicksByTeamAndSport } from "./picks-utils";
import type { RawFlagConfig } from "~/lib/flag-types";
import type { AvatarData, RawFlagConfig } from "~/lib/flag-types";
interface DraftSummaryViewProps {
draftSlots: Array<{
@ -12,6 +12,7 @@ interface DraftSummaryViewProps {
logoUrl?: string | null;
flagConfig?: RawFlagConfig | null;
avatarType?: string | null;
ownerAvatarData?: AvatarData | null;
};
}>;
ownerMap?: Record<string, string>;
@ -102,6 +103,7 @@ export const DraftSummaryView = memo(function DraftSummaryView({
logoUrl={slot.team.logoUrl}
flagConfig={slot.team.flagConfig}
avatarType={slot.team.avatarType}
ownerAvatarData={slot.team.ownerAvatarData}
size="md"
/>
<div className="text-xs font-semibold text-center truncate w-full">