- Delete orphaned components (theme-provider, task-claim-button), the unused roleDisplayName helper, the fully-dead cleanupRateLimits, the 6 never-imported validation schemas (signIn/signUp/createSpace/joinSpace — a replaced auth flow; proposalStatuses; updateAreaLeadRoleSchema). - Migrate all @/lib/types importers to the canonical @/types/domain and delete the compatibility shim. tsc 0, 635 tests green, lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
18 lines
582 B
TypeScript
18 lines
582 B
TypeScript
import type { ProposalStatus } from '@/types/domain'
|
|
|
|
const STATUS_STYLE: Record<ProposalStatus, string> = {
|
|
draft: 'text-muted-foreground bg-muted',
|
|
open: 'text-primary bg-primary/10',
|
|
decided: 'text-blue-600 bg-blue-50',
|
|
withdrawn: 'text-muted-foreground bg-muted',
|
|
expired: 'text-orange-600 bg-orange-50',
|
|
}
|
|
|
|
export function ProposalStatusBadge({ status }: { status: ProposalStatus }) {
|
|
return (
|
|
<span className={`font-mono text-[10px] tracking-widest uppercase px-1.5 py-0.5 rounded ${STATUS_STYLE[status]}`}>
|
|
{status.replace(/_/g, ' ')}
|
|
</span>
|
|
)
|
|
}
|