Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions src/ui/components/BoxScore.football.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,20 @@ const ScoringSummary = memo(
const NUM_SECTIONS = 12;
const DEFAULT_HEIGHT = 200;

const FieldBackground = ({ t, t2 }: { t: Team; t2: Team }) => {
const FieldBackground = ({ t, t2, hT }: { t: Team; t2: Team; hT: string }) => {
const styles: CSSProperties = {
height: "100%",
width: "100%",
backgroundImage: "url(" + hT + ")",
backgroundRepeat: "no-repeat",
backgroundPosition: "center",
backgroundSize: `${(1 / 12) * 100}%`,
tabSize: 0,
position: "absolute",
};
return (
<div className="d-flex align-items-stretch position-absolute w-100 h-100">
<div style={styles}></div>
{range(NUM_SECTIONS).map(i => {
const style: CSSProperties = {
width: `${(1 / 12) * 100}%`,
Expand Down Expand Up @@ -740,7 +751,11 @@ const FieldAndDrive = ({
minHeight: DEFAULT_HEIGHT,
}}
>
<FieldBackground t={boxScore.teams[0]} t2={boxScore.teams[1]} />
<FieldBackground
t={boxScore.teams[0]}
t2={boxScore.teams[1]}
hT={boxScore.teams[1].imgURL}
/>
{!sportState.newPeriodText ? (
<>
<VerticalLine
Expand Down