Skip to content

Commit 1c0b989

Browse files
committed
init page
1 parent 7b3daea commit 1c0b989

3 files changed

Lines changed: 429 additions & 0 deletions

File tree

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
'use client'
2+
import styles from '@/app/styles/Scouting.module.css'
3+
4+
export default function ScoutingPlayerProfile({ playerData }) {
5+
const {
6+
firstName,
7+
lastName,
8+
age,
9+
height,
10+
class: classYear,
11+
position,
12+
plays,
13+
backhand,
14+
bio,
15+
photo,
16+
recentMatches
17+
} = playerData
18+
19+
const photoUrl = photo || '/images/defaultPhotoBig.png'
20+
21+
return (
22+
<div className={styles.playerProfileContainer}>
23+
<div className={styles.profileSection}>
24+
<div className={styles.playerInfo}>
25+
<h2>{firstName}</h2>
26+
<h1>{lastName}</h1>
27+
<p className={styles.meta}>
28+
AGE {age} | HEIGHT {height} | CLASS {classYear.toUpperCase()}
29+
</p>
30+
</div>
31+
<div className={styles.playerImage}>
32+
<img src={photoUrl} alt={`${firstName} ${lastName}`} />
33+
</div>
34+
35+
<div className={styles.playerStats}>
36+
<div className={styles.statRow}>
37+
<span className={styles.label}>POSITION</span>
38+
<span className={styles.value}>{position}</span>
39+
</div>
40+
<div className={styles.statRow}>
41+
<span className={styles.label}>PLAYS</span>
42+
<span className={styles.value}>{plays}</span>
43+
</div>
44+
<div className={styles.statRow}>
45+
<span className={styles.label}>BACKHAND</span>
46+
<span className={styles.value}>{backhand}</span>
47+
</div>
48+
<p className={styles.bio}>{bio}</p>
49+
</div>
50+
</div>
51+
52+
<div className={styles.recentMatches}>
53+
<h2>Recent Matches</h2>
54+
{recentMatches.map((match, index) => (
55+
<div key={index} className={styles.matchCard}>
56+
<div className={styles.matchMeta}>
57+
<div className={styles.matchInfo}>
58+
<div className={styles.value}>{match.eventName}</div>
59+
<div className={styles.label}>{match.date}</div>
60+
</div>
61+
<div
62+
style={{
63+
display: 'grid',
64+
gridTemplateColumns: '1fr 1fr',
65+
gap: '10px'
66+
}}
67+
>
68+
<div className={styles.statItem}>
69+
<div className={styles.value}>{match.serviceGamesHeld}</div>
70+
<div className={styles.label}>Service Games Held</div>
71+
</div>
72+
<div className={styles.statItem}>
73+
<div className={styles.value}>{match.aces}</div>
74+
<div className={styles.label}>Aces</div>
75+
</div>
76+
</div>
77+
</div>
78+
79+
<div className={styles.scoreSection}>
80+
<div className={styles.scoreHeader}>
81+
<span>Final Score</span>
82+
<span>0:00</span>
83+
</div>
84+
{match.players.map((player, i) => (
85+
<div key={i} className={styles.scoreRow}>
86+
<span
87+
className={`${styles.playerName} ${i === 0 ? styles.highlighted : styles.dimmed}`}
88+
>
89+
{player}
90+
</span>
91+
<span className={styles.score}>
92+
{match.finalScore[i].join(' ')}
93+
</span>
94+
</div>
95+
))}
96+
<a
97+
href={match.videoUrl}
98+
className={styles.videoButton}
99+
target="_blank"
100+
rel="noopener noreferrer"
101+
>
102+
Video
103+
</a>
104+
</div>
105+
</div>
106+
))}
107+
</div>
108+
</div>
109+
)
110+
}

app/scouting/page.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
'use client'
2+
3+
import ScoutingPlayerProfile from '@/app/components/ScoutingPlayerProfile'
4+
5+
export default function ScoutingPlayerProfilePage() {
6+
// This mock data would typically come from the backend or Firebase
7+
const mockData = {
8+
firstName: 'First',
9+
lastName: 'Last',
10+
age: '00',
11+
height: "0'00",
12+
class: 'Freshman',
13+
position: '#0',
14+
plays: 'Right',
15+
backhand: '2-Handed',
16+
bio: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
17+
photo: '',
18+
recentMatches: [
19+
{
20+
eventName: 'Event Name',
21+
date: 'January 1st, 2025',
22+
serviceGamesHeld: 0,
23+
aces: 0,
24+
finalScore: [
25+
[0, 0, 0],
26+
[0, 0, 0]
27+
],
28+
players: ['Player Name', 'Player Name'],
29+
videoUrl: '#'
30+
},
31+
{
32+
eventName: 'Event Name',
33+
date: 'January 1st, 2025',
34+
serviceGamesHeld: 0,
35+
aces: 0,
36+
finalScore: [
37+
[0, 0, 0],
38+
[0, 0, 0]
39+
],
40+
players: ['Player Name', 'Player Name'],
41+
videoUrl: '#'
42+
},
43+
{
44+
eventName: 'Event Name',
45+
date: 'January 1st, 2025',
46+
serviceGamesHeld: 0,
47+
aces: 0,
48+
finalScore: [
49+
[0, 0, 0],
50+
[0, 0, 0]
51+
],
52+
players: ['Player Name', 'Player Name'],
53+
videoUrl: '#'
54+
}
55+
]
56+
}
57+
58+
return <ScoutingPlayerProfile playerData={mockData} />
59+
}

0 commit comments

Comments
 (0)