Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b9709d3

Browse files
committedSep 20, 2024
Update some styling and add more team cards
1 parent 69cf261 commit b9709d3

File tree

5 files changed

+150
-0
lines changed

5 files changed

+150
-0
lines changed
 

‎app/page.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import { useEffect, useState } from "react";
33
import PatriotsCard from "@/components/PatriotsCard";
44
import Header from "@/components/Header";
5+
import PhoenixSunsCard from "@/components/SunsCard";
6+
import NewYorkMetsCard from "@/components/MetsCard";
7+
import ManchesterUnitedCard from "@/components/UnitedCard";
58

69
interface UpcomingGame {
710
name: string;
@@ -56,6 +59,14 @@ export default function Home() {
5659
teamLogo={patriotsData?.teamLogo || ''}
5760
nextGame={patriotsData?.nextGame || null}
5861
/>
62+
<PhoenixSunsCard
63+
wins={100}
64+
losses={100}
65+
teamLogo=""
66+
nextGame={new Date}
67+
/>
68+
<NewYorkMetsCard/>
69+
<ManchesterUnitedCard/>
5970
</div>
6071
</div>
6172
);

‎components/MetsCard.tsx

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import React from 'react';
2+
3+
interface UpcomingGame {
4+
name: string;
5+
date: string;
6+
time: string;
7+
week: number;
8+
opponentLogo: string;
9+
}
10+
11+
interface NewYorkMetsCardProps {
12+
wins: number;
13+
losses: number;
14+
nextGame: UpcomingGame | null;
15+
teamLogo: string;
16+
}
17+
18+
const NewYorkMetsCard: React.FC<NewYorkMetsCardProps> = ({ wins, losses, teamLogo, nextGame }) => {
19+
return (
20+
<div className="bg-[#002D72] border rounded-lg p-6 shadow-md">
21+
<div className="flex items-center justify-around">
22+
<img src={teamLogo} alt="New York Mets Logo" className="w-40 h-40" />
23+
<div className="flex items-center flex-col gap-2">
24+
<h2 className="text-2xl font-bold">New York Mets</h2>
25+
<p className="text-2xl text-neutral-300">{wins} - {losses}</p>
26+
</div>
27+
</div>
28+
{nextGame ? (
29+
<div className="mt-4">
30+
<h3 className="font-semibold px-2 text-gray-200">Next Game:</h3>
31+
<div className="flex items-center gap-4 px-2">
32+
<img src={nextGame.opponentLogo} alt={`${nextGame.name} Logo`} className="w-14 h-14" />
33+
<div>
34+
<p className='text-gray-200'>{nextGame.name}</p>
35+
<p className="text-sm text-gray-500">{nextGame.date} at {nextGame.time} (Week {nextGame.week})</p>
36+
</div>
37+
</div>
38+
</div>
39+
) : (
40+
<p className="text-gray-500">No upcoming games</p>
41+
)}
42+
</div>
43+
);
44+
};
45+
46+
export default NewYorkMetsCard;

‎components/SunsCard.tsx

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import React from 'react';
2+
3+
interface UpcomingGame {
4+
name: string;
5+
date: string;
6+
time: string;
7+
week: number;
8+
opponentLogo: string;
9+
}
10+
11+
interface PhoenixSunsCardProps {
12+
wins: number;
13+
losses: number;
14+
nextGame: UpcomingGame | null;
15+
teamLogo: string;
16+
}
17+
18+
const PhoenixSunsCard: React.FC<PhoenixSunsCardProps> = ({ wins, losses, teamLogo, nextGame }) => {
19+
return (
20+
<div className="bg-[#5A2D91] border rounded-lg p-6 shadow-md">
21+
<div className="flex items-center justify-around">
22+
<img src={teamLogo} alt="Phoenix Suns Logo" className="w-40 h-40" />
23+
<div className="flex items-center flex-col gap-2">
24+
<h2 className="text-2xl font-bold">Phoenix Suns</h2>
25+
<p className="text-2xl text-neutral-300">{wins} - {losses}</p>
26+
</div>
27+
</div>
28+
{nextGame ? (
29+
<div className="mt-4">
30+
<h3 className="font-semibold px-2 text-gray-200">Next Game:</h3>
31+
<div className="flex items-center gap-4 px-2">
32+
<img src={nextGame.opponentLogo} alt={`${nextGame.name} Logo`} className="w-14 h-14" />
33+
<div>
34+
<p className='text-gray-200'>{nextGame.name}</p>
35+
<p className="text-sm text-gray-500">{nextGame.date} at {nextGame.time} (Week {nextGame.week})</p>
36+
</div>
37+
</div>
38+
</div>
39+
) : (
40+
<p className="text-gray-500">No upcoming games</p>
41+
)}
42+
</div>
43+
);
44+
};
45+
46+
export default PhoenixSunsCard;

‎components/UnitedCard.tsx

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import React from 'react';
2+
3+
interface UpcomingGame {
4+
name: string;
5+
date: string;
6+
time: string;
7+
week: number;
8+
opponentLogo: string;
9+
}
10+
11+
interface ManchesterUnitedCardProps {
12+
wins: number;
13+
losses: number;
14+
nextGame: UpcomingGame | null;
15+
teamLogo: string;
16+
}
17+
18+
const ManchesterUnitedCard: React.FC<ManchesterUnitedCardProps> = ({ wins, losses, teamLogo, nextGame }) => {
19+
return (
20+
<div className="bg-[#DA291C] border rounded-lg p-6 shadow-md">
21+
<div className="flex items-center justify-around">
22+
<img src={teamLogo} alt="Manchester United Logo" className="w-40 h-40" />
23+
<div className="flex items-center flex-col gap-2">
24+
<h2 className="text-2xl font-bold">Manchester United</h2>
25+
<p className="text-2xl text-neutral-300">{wins} - {losses}</p>
26+
</div>
27+
</div>
28+
{nextGame ? (
29+
<div className="mt-4">
30+
<h3 className="font-semibold px-2 text-gray-200">Next Game:</h3>
31+
<div className="flex items-center gap-4 px-2">
32+
<img src={nextGame.opponentLogo} alt={`${nextGame.name} Logo`} className="w-14 h-14" />
33+
<div>
34+
<p className='text-gray-200'>{nextGame.name}</p>
35+
<p className="text-sm text-gray-500">{nextGame.date} at {nextGame.time} (Week {nextGame.week})</p>
36+
</div>
37+
</div>
38+
</div>
39+
) : (
40+
<p className="text-gray-500">No upcoming games</p>
41+
)}
42+
</div>
43+
);
44+
};
45+
46+
export default ManchesterUnitedCard;

‎components/ui/button.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
5454
Button.displayName = "Button"
5555

5656
export { Button, buttonVariants }
57+

0 commit comments

Comments
 (0)
Failed to load comments.