Skip to content

Commit 8127a13

Browse files
committed
chore(example): update the root view component
1 parent 4c1e2af commit 8127a13

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

example/src/views/RootView.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,15 @@ const RootView: React.FC = () => {
7777
}
7878
});
7979
const progressSubscription = Speech.onProgress(({id, location, length}) => {
80-
if (id === targetId.current) {
81-
setHighlights([
82-
{
83-
start: location,
84-
end: location + length,
85-
},
86-
]);
87-
console.log(
88-
`Speech ${id} progress, current word length: ${length}, current char position: ${location}`,
89-
);
90-
}
80+
setHighlights([
81+
{
82+
start: location,
83+
end: location + length,
84+
},
85+
]);
86+
console.log(
87+
`Speech ${id} progress, current word length: ${length}, current char position: ${location}`,
88+
);
9189
});
9290

9391
// (async () => {

0 commit comments

Comments
 (0)