'use client'; import { memo } from 'react'; import { BugStatusBadge } from './BugStatusBadge'; import { BUG_SEVERITY_LABEL, BUG_SEVERITY_COLOR, getBugActualHours } from '@/lib/bug'; import { formatWorkHours } from '@/lib/work-hours'; import type { Bug } from '@/lib/bug'; interface Props { bug: Bug; testCaseNo?: string; onClick?: () => void; } const PRIORITY_DOT: Record = { P0: 'bg-red-500', P1: 'bg-orange-400', P2: 'bg-blue-400', P3: 'bg-zinc-300', }; function BugRowImpl({ bug, testCaseNo, onClick }: Props) { const actualHours = getBugActualHours(bug); return (
{bug.bugNo} {bug.title} {BUG_SEVERITY_LABEL[bug.severity]} {actualHours > 0 && ( {formatWorkHours(actualHours)} )} {testCaseNo && {testCaseNo}} {bug.assigneeId}
); } export const BugRow = memo(BugRowImpl);