www: update frontend to support new transcript format in topics

This commit is contained in:
2023-10-19 21:05:49 +02:00
committed by Mathieu Virbel
parent b323254376
commit 6d074ed457
7 changed files with 258 additions and 6 deletions

View File

@@ -103,7 +103,17 @@ export function TopicList({
/>
</div>
{activeTopic?.id == topic.id && (
<div className="p-2">{topic.transcript}</div>
<div className="p-2">
{topic.segments.map((segment, index) => (
<p
key={index}
className="text-left text-slate-500 text-sm md:text-base"
>
[{formatTime(segment.timestamp)}] Speaker{" "}
{segment.speaker}: {segment.text}
</p>
))}
</div>
)}
</button>
))}