Split the 854-line DSR detail page into colocated components under _components/ and a data-loading hook under _hooks/. No behavior changes. page.tsx is now 172 LOC, all extracted files under 300 LOC. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
16 lines
427 B
TypeScript
16 lines
427 B
TypeScript
'use client'
|
|
|
|
import React from 'react'
|
|
import { DSR_STATUS_INFO } from '@/lib/sdk/dsr/types'
|
|
|
|
export function StatusBadge({ status }: { status: string }) {
|
|
const info = DSR_STATUS_INFO[status as keyof typeof DSR_STATUS_INFO]
|
|
if (!info) return null
|
|
|
|
return (
|
|
<span className={`px-3 py-1.5 text-sm font-medium rounded-lg ${info.bgColor} ${info.color} border ${info.borderColor}`}>
|
|
{info.label}
|
|
</span>
|
|
)
|
|
}
|