Skip to content

Commit

Permalink
Add full time differencial on matches list
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres2D committed Feb 12, 2023
1 parent 466f149 commit a0bb33d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
7 changes: 7 additions & 0 deletions components/matches/match-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ const MatchList: NextPage<Props> = ({ matches }) => {
<Team
name={home_team.name}
image={home_team.shield}
fullTime={fullTime}
score={homeScore}
width={120}
height={120}
/>
Expand All @@ -225,6 +227,8 @@ const MatchList: NextPage<Props> = ({ matches }) => {
<Team
name={away_team.name}
image={away_team.shield}
fullTime={fullTime}
score={awayScore}
width={120}
height={120}
/>
Expand All @@ -235,6 +239,7 @@ const MatchList: NextPage<Props> = ({ matches }) => {
colorScheme="teal"
size="md"
mb={2}
disabled={fullTime}
aria-label="Edit match"
icon={<SettingsIcon />}
/>
Expand Down Expand Up @@ -262,6 +267,7 @@ const MatchList: NextPage<Props> = ({ matches }) => {
size="md"
aria-label="Deleted match"
mb={2}
disabled={fullTime}
onClick={() =>
showLeaveMatchModal({
_id,
Expand All @@ -278,6 +284,7 @@ const MatchList: NextPage<Props> = ({ matches }) => {
/>
<IconButton
colorScheme="green"
disabled={fullTime}
size="md"
aria-label="Full time"
onClick={() =>
Expand Down
12 changes: 10 additions & 2 deletions components/matches/team.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@
align-items: center;
position: relative;

.tag {
.tag,
.score {
color: #333 !important;
margin-top: 20px;
}

.tag {
margin-top: 10px;
}

.score {
margin-top: 5px;
}

.logoShadow {
Expand Down
15 changes: 14 additions & 1 deletion components/matches/team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import styles from './team.module.scss';
interface Props {
name: string;
image: string;
fullTime: boolean,
score: number;
width: number;
height: number;
}

const Team: NextPage<Props> = ({name, image, width, height}: Props) => {
const Team: NextPage<Props> = ({name, image, fullTime, score, width, height}: Props) => {
return (
<div className={styles.team}>
<Image
Expand All @@ -28,6 +30,17 @@ const Team: NextPage<Props> = ({name, image, width, height}: Props) => {
>
{name}
</Tag>
{
fullTime &&
<Tag
size='lg'
variant='solid'
colorScheme='clean'
className={styles.score}
>
{score}
</Tag>
}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion pages/matches/[...matchId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const MatchDetails: NextPage<Props> = ({match, profile}) => {
<>
<HeaderSettings
title={`${matchDetail.match.home_team.name} vs ${matchDetail.match.away_team.name}`}
description='Set the line uo'
description='Set the line up'
/>
<MatchDetailsLayout />
</>
Expand Down

0 comments on commit a0bb33d

Please sign in to comment.