Skip to content

Commit

Permalink
Fix teamview
Browse files Browse the repository at this point in the history
  • Loading branch information
irdkwmnsb committed Nov 5, 2023
1 parent b5f3319 commit e1e0bb4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,17 @@ const TeamViewWrapper = styled.div`
`;


const TeamViewContestantViewHolder = styled(ContestantViewHolder)`
top: 0; // # FIXME: fuck this.
`;

function TeamViewContent({ mediaContent, settings, setLoadedComponents, location, isSmall }) {
const hasPInP = settings.content.filter(e => !e.isMedia).concat(mediaContent).filter((c) => c.pInP).length > 0;

return <TeamViewWrapper sizeX={location.sizeX} sizeY={location.sizeY}>
{settings.content.filter(e => !e.isMedia).concat(mediaContent).map((c, index) => {
const onLoadStatus = (v) => setLoadedComponents(m => v ? (m | (1 << index)) : (m & ~(1 << index)));
const component = <ContestantViewHolder key={c.type + index} onLoadStatus={onLoadStatus} media={c}
const component = <TeamViewContestantViewHolder key={c.type + index} onLoadStatus={onLoadStatus} media={c}
isSmall={isSmall} hasPInP={hasPInP}/>;
if (c.pInP) {
return <TeamViewPInPWrapper key={c.type + index} sizeX={location.sizeX}>{component}</TeamViewPInPWrapper>;
Expand Down

0 comments on commit e1e0bb4

Please sign in to comment.