Initial commit v1.1

This commit is contained in:
Rolf
2026-03-18 13:34:41 +01:00
parent cb04bf2ab8
commit b982584244
38 changed files with 3196 additions and 1103 deletions
+15 -15
View File
@@ -12,16 +12,16 @@ import Link from 'next/link'
type Player = {
id: string
role: string
handicap_index: number | null
course_handicap: number | null
profile: { id: string; display_name: string; avatar_url: string | null } | null
handicapIndex: string | null
courseHandicap: number | null
profile: { id: string; displayName: string; avatarUrl: string | null } | null
}
type Invite = {
id: string
email: string
accepted_at: string | null
created_at: string
acceptedAt: Date | null
createdAt: Date
}
type Round = {
@@ -29,10 +29,10 @@ type Round = {
name: string | null
date: string
status: string
holes_count: number
created_by: string
course: { id: string; name: string; par: number } | null
tee: { id: string; name: string; color: string; course_rating: number; slope_rating: number } | null
holesCount: number
createdBy: string
course: { name: string } | null
tee: { name: string; color: string } | null
}
export function RoundLobby({
@@ -95,7 +95,7 @@ export function RoundLobby({
</h1>
<p className="text-xs text-muted-foreground">
{round.course?.name} · {round.tee?.name} tees ·{' '}
{round.holes_count} holes ·{' '}
{round.holesCount} holes ·{' '}
{new Date(round.date).toLocaleDateString()}
</p>
</div>
@@ -114,13 +114,13 @@ export function RoundLobby({
{players.map((p) => (
<div key={p.id} className="flex items-center gap-3 rounded-xl border p-3">
<Avatar
name={p.profile?.display_name ?? '?'}
url={p.profile?.avatar_url}
name={p.profile?.displayName ?? '?'}
url={p.profile?.avatarUrl}
/>
<div className="flex-1 min-w-0">
<div className="flex items-center gap-2">
<span className="font-medium truncate">
{p.profile?.display_name}
{p.profile?.displayName}
</span>
{p.profile?.id === currentUserId && (
<span className="text-xs text-muted-foreground">(you)</span>
@@ -132,8 +132,8 @@ export function RoundLobby({
)}
</div>
<div className="text-xs text-muted-foreground">
{p.handicap_index !== null
? `HCP ${p.handicap_index} · Course HCP ${p.course_handicap}`
{p.handicapIndex !== null
? `HCP ${p.handicapIndex} · Course HCP ${p.courseHandicap}`
: 'No handicap'}
</div>
</div>