diff --git a/www/app/components/dashboard.js b/www/app/components/dashboard.js index d7d5dde9..79e15efb 100644 --- a/www/app/components/dashboard.js +++ b/www/app/components/dashboard.js @@ -78,9 +78,7 @@ export function Dashboard({
- setActiveTopic( - activeTopic == item.timestamp ? null : item.timestamp, - ) + setActiveTopic(activeTopic?.id == item.id ? null : item) } >
{formatTime(item.timestamp)}
@@ -89,14 +87,14 @@ export function Dashboard({
- {activeTopic == item.timestamp && ( + {activeTopic?.id == item.id && (
{item.transcript}
diff --git a/www/app/components/record.js b/www/app/components/record.js index 3b178125..c77d3838 100644 --- a/www/app/components/record.js +++ b/www/app/components/record.js @@ -138,7 +138,7 @@ export default function Recorder(props) { }); region.on("click", (e) => { e.stopPropagation(); - setActiveTopic(region.start); + setActiveTopic(topic); wavesurfer.setTime(region.start); }); } @@ -164,7 +164,7 @@ export default function Recorder(props) { useEffect(() => { if (activeTopic) { - wavesurfer.setTime(activeTopic); + wavesurfer.setTime(activeTopic.timestamp); } }, [activeTopic]);