Fix 'refresh'

When the 'refresh' icon is clicked, we should reset 'endOfStream'
to false or the stream will stop playing after the first ayah.
This commit is contained in:
0x1eef 2023-09-16 20:56:06 -03:00
parent 461b3a0092
commit 84c91974ed

View file

@ -62,6 +62,7 @@ function SurahStream({ node, reciters, locale, paused, t }: Props) {
};
useEffect(() => {
setEndOfStream(false);
setStream([surah.ayat[0]]);
}, [stream.length === 0]);