Files
breakpilot-compliance/admin-compliance/app/sdk/dsr/[requestId]/_components/StatusBadge.tsx
Sharang Parnerkar cc3a9a37dc refactor(admin): split dsr/[requestId] page.tsx into colocated components
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>
2026-04-15 08:20:24 +02:00

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>
)
}