import { useState } from "react"; import { CheckCircle2, ChevronDown, ChevronRight } from "lucide-react"; import type { InterviewResult, QAPair } from "../../../services/interviewApi"; interface Props { result: InterviewResult; } export default function InterviewResultView({ result }: Props) { const [openSections, setOpenSections] = useState>(new Set([0])); const toggleSection = (i: number) => { setOpenSections((prev) => { const next = new Set(prev); if (next.has(i)) next.delete(i); else next.add(i); return next; }); }; return (
{/* Header */}
Hasil Interview
{/* Summary */} {result.summary && (

Ringkasan

{result.summary}

)} {/* Goals */} {result.goals?.length > 0 && (

Tujuan

    {result.goals.map((g, i) => (
  • {g}
  • ))}
)} {/* Section Results */} {result.section_results?.length > 0 && (

Sesi Pertanyaan

{result.section_results.map((section, i) => (
{openSections.has(i) && (
{section.section_summary && (

{section.section_summary}

)} {section.qa_pairs?.map((qa, j) => ( ))}
)}
))}
)} {/* Key Insights */} {result.key_insights?.length > 0 && (

Key Insights

    {result.key_insights.map((insight, i) => (
  • {insight}
  • ))}
)} {/* Unresolved Items */} {result.unresolved_items?.length > 0 && (

Belum Terjawab

    {result.unresolved_items.map((item, i) => (
  • {item}
  • ))}
)}
); } function QAItem({ qa, depth }: { qa: QAPair; depth: number }) { return (
0 ? "ml-4 pl-3 border-l-2 border-slate-100" : ""}>

T: {qa.question_text}

J: {qa.answer_cleaned}

{qa.follow_ups?.map((f, i) => ( ))}
); }