summaryrefslogtreecommitdiff
path: root/components/bidding/bidding-info-header.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/bidding/bidding-info-header.tsx')
-rw-r--r--components/bidding/bidding-info-header.tsx21
1 files changed, 1 insertions, 20 deletions
diff --git a/components/bidding/bidding-info-header.tsx b/components/bidding/bidding-info-header.tsx
index c140920b..e109a8ca 100644
--- a/components/bidding/bidding-info-header.tsx
+++ b/components/bidding/bidding-info-header.tsx
@@ -1,31 +1,12 @@
import { Bidding } from '@/db/schema/bidding'
import { Building2, Package, User, DollarSign, Calendar } from 'lucide-react'
import { contractTypeLabels, biddingTypeLabels } from '@/db/schema/bidding'
+import { formatDate } from '@/lib/utils'
interface BiddingInfoHeaderProps {
bidding: Bidding
}
-function formatDate(date: Date | string | null | undefined, locale: 'KR' | 'EN' = 'KR'): string {
- if (!date) return ''
-
- const dateObj = typeof date === 'string' ? new Date(date) : date
-
- if (locale === 'KR') {
- return dateObj.toLocaleDateString('ko-KR', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit'
- }).replace(/\./g, '-').replace(/-$/, '')
- }
-
- return dateObj.toLocaleDateString('en-US', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit'
- })
-}
-
export function BiddingInfoHeader({ bidding }: BiddingInfoHeaderProps) {
return (
<div className="bg-white border rounded-lg p-6 mb-6 shadow-sm">