'use client' import * as React from 'react' import { Bidding } from '@/db/schema' import { BiddingDetailVendorTableContent } from '../detail/table/bidding-detail-vendor-table' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { getBiddingDetailData } from '../detail/service' interface VendorSelectionTableProps { biddingId: number bidding: Bidding onRefresh: () => void } export function VendorSelectionTable({ biddingId, bidding, onRefresh }: VendorSelectionTableProps) { const [vendors, setVendors] = React.useState([]) const [loading, setLoading] = React.useState(true) React.useEffect(() => { const loadData = async () => { try { setLoading(true) const data = await getBiddingDetailData(biddingId) setVendors(data.quotationVendors) } catch (error) { console.error('Failed to load vendors:', error) } finally { setLoading(false) } } loadData() }, [biddingId]) if (loading) { return ( 업체선정
로딩 중...
) } return ( 업체선정 {}} /> ) }