Initial project scaffolding

This commit is contained in:
2026-03-25 22:34:03 -04:00
commit a46c97c88a
92 changed files with 9671 additions and 0 deletions

23
app/stores/boat.ts Normal file
View File

@@ -0,0 +1,23 @@
import { defineStore } from 'pinia'
// TODO: Replace with generated Supabase types after `npx supabase gen types typescript`
interface Boat {
id: string
name: string
description: string | null
active: boolean
created_at: string
}
export const useBoatStore = defineStore('boat', () => {
const supabase = useSupabaseClient()
const boats = ref<Map<string, Boat>>(new Map())
async function fetchBoats() {
const { data, error } = await supabase.from('boats').select('*').order('name')
if (error) throw error
boats.value = new Map((data as Boat[]).map((b) => [b.id, b]))
}
return { boats, fetchBoats }
})