refactor: generate and use Supabase TypeScript types

Co-authored-by: Moheeb Zara <[email protected]>
This commit is contained in:
v0
2026-03-11 08:12:39 +00:00
co-authored by Moheeb Zara
parent c34d5d9529
commit 2e136b5f55
18 changed files with 1135 additions and 342 deletions
+4 -11
View File
@@ -4,21 +4,14 @@ import { useState } from 'react'
import { X, RefreshCcw } from 'lucide-react'
import { toast } from 'sonner'
import { logCashPayment, linkPaymentToMember } from '@/lib/actions'
import type { Tables } from '@/types/database'
interface Payment {
id: string
platform: string
amount: number
from_identifier: string
from_note?: string
transaction_date: string
link_status: string
member_id?: string
type Payment = Tables<'payments'> & {
space_members?: { display_name: string } | null
}
interface Member { id: string; display_name: string; email: string }
interface Integration { platform: string; is_connected: boolean; config?: Record<string, string> }
type Member = Pick<Tables<'space_members'>, 'id' | 'display_name' | 'email'>
type Integration = Pick<Tables<'integrations'>, 'platform' | 'is_connected' | 'config'>
interface Props {
payments: Payment[]