5 files changed +150
-0
lines changed Original file line number Diff line number Diff line change 2
2
import { useEffect , useState } from "react" ;
3
3
import PatriotsCard from "@/components/PatriotsCard" ;
4
4
import Header from "@/components/Header" ;
5
+ import PhoenixSunsCard from "@/components/SunsCard" ;
6
+ import NewYorkMetsCard from "@/components/MetsCard" ;
7
+ import ManchesterUnitedCard from "@/components/UnitedCard" ;
5
8
6
9
interface UpcomingGame {
7
10
name : string ;
@@ -56,6 +59,14 @@ export default function Home() {
56
59
teamLogo = { patriotsData ?. teamLogo || '' }
57
60
nextGame = { patriotsData ?. nextGame || null }
58
61
/>
62
+ < PhoenixSunsCard
63
+ wins = { 100 }
64
+ losses = { 100 }
65
+ teamLogo = ""
66
+ nextGame = { new Date }
67
+ />
68
+ < NewYorkMetsCard />
69
+ < ManchesterUnitedCard />
59
70
</ div >
60
71
</ div >
61
72
) ;
Original file line number Diff line number Diff line change
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 ;
Original file line number Diff line number Diff line change
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 ;
Original file line number Diff line number Diff line change
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 ;
Original file line number Diff line number Diff line change @@ -54,3 +54,4 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
54
54
Button . displayName = "Button"
55
55
56
56
export { Button , buttonVariants }
57
+
0 commit comments