Initial commit v1
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
import { NewRoundWizard } from '@/components/round/new-round-wizard'
|
||||
|
||||
type Tee = {
|
||||
id: string
|
||||
name: string
|
||||
color: string
|
||||
course_rating: number
|
||||
slope_rating: number
|
||||
}
|
||||
|
||||
type Course = {
|
||||
id: string
|
||||
name: string
|
||||
par: number
|
||||
tees: Tee[]
|
||||
}
|
||||
|
||||
export default async function NewRoundPage() {
|
||||
const supabase = await createClient()
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const { data: courses } = await (supabase as any)
|
||||
.from('courses')
|
||||
.select('id, name, par, tees(id, name, color, course_rating, slope_rating)')
|
||||
.order('name')
|
||||
|
||||
return <NewRoundWizard courses={(courses as Course[]) ?? []} />
|
||||
}
|
||||
Reference in New Issue
Block a user