Skip to content

Commit

Permalink
Fix 'refresh'
Browse files Browse the repository at this point in the history
When the 'refresh' icon is clicked, we should reset 'endOfStream'
to false or the stream will stop playing after the first ayah.
  • Loading branch information
0x1eef committed Sep 16, 2023
1 parent cbfd089 commit 376bcbe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/pages/surah/stream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function SurahStream({ node, reciters, locale, paused, t }: Props) {
};

useEffect(() => {
setEndOfStream(false);
setStream([surah.ayat[0]]);
}, [stream.length === 0]);

Expand Down

0 comments on commit 376bcbe

Please sign in to comment.