Skip to content

Commit

Permalink
enabled checkmarks on event-match page
Browse files Browse the repository at this point in the history
  • Loading branch information
varCepheid committed Aug 30, 2024
1 parent 48c9faa commit ce845c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions src/components/event-matches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,7 @@ export const EventMatches = ({ matches, eventKey }: Props) => {
/>
<div class={matchListStyle}>
{filteredMatches.map((m) => (
<MatchDetailsCard
eventKey={eventKey}
match={m}
key={m.key}
link
checkmark
/>
<MatchDetailsCard eventKey={eventKey} match={m} key={m.key} link />
))}
</div>
</>
Expand Down
14 changes: 7 additions & 7 deletions src/components/match-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ interface MatchCardProps {
eventKey: string
link?: boolean
class?: string
checkmark?: boolean
}

const matchCardStyle = css`
Expand All @@ -34,21 +33,22 @@ const matchCardStyle = css`
& > time {
grid-row: span 2;
grid-column: 3;
place-self: center end;
place-self: center center;
font-size: 0.85rem;
color: var(--grey-text);
white-space: nowrap;
text-overflow: ellipsis;
margin-left: 0.3rem;
}
`

const matchTitleStyle = css`
font-weight: bold;
grid-row: span 2;
white-space: nowrap;
margin: 0.3rem 0.6rem;
align-content: end;
text-align: right;
margin: 0.3rem 0.3rem;
align-content: center;
text-align: center;
& > * {
margin: 0.3rem 0;
Expand Down Expand Up @@ -96,7 +96,7 @@ const checkmarkStyle = css`
`

export const MatchDetailsCard = memo(
({ match, eventKey, link, class: className, checkmark }: MatchCardProps) => {
({ match, eventKey, link, class: className }: MatchCardProps) => {
const matchName = formatMatchKey(match.key)

const createTeamLinks = (teams: string[]) =>
Expand Down Expand Up @@ -124,7 +124,7 @@ export const MatchDetailsCard = memo(
<div class={matchNumStyle}>{`Match ${matchName.num}`}</div>
)}
</div>
{typeof match.redScore === 'number' && checkmark && (
{typeof match.redScore === 'number' && (
<Icon icon={mdiCheckCircle} class={checkmarkStyle} />
)}
{match.time && (
Expand Down
1 change: 0 additions & 1 deletion src/routes/event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ const Event = ({ eventKey }: Props) => {
match={newestIncompleteMatch}
eventKey={eventKey}
link
checkmark
/>
)}
{matches ? (
Expand Down

0 comments on commit ce845c6

Please sign in to comment.