Fix "rake ci"

This commit is contained in:
0x1eef 2024-05-24 14:07:52 -03:00
parent 4a362b7db8
commit 9641ea2f57

View file

@ -13,28 +13,22 @@ type Props = {
onComplete: (surah: Surah, ayah: Ayah) => void; onComplete: (surah: Surah, ayah: Ayah) => void;
}; };
export function Timer({ export function Timer({ locale, surah, ayah, isPaused, audioStatus, onComplete }: Props) {
locale,
surah,
ayah,
isPaused,
audioStatus,
onComplete,
}: Props) {
const [ms, setMs] = useState<number | null>(null); const [ms, setMs] = useState<number | null>(null);
const isStalled = audioStatus === "wait"; const isStalled = audioStatus === "wait";
useEffect(() => { useEffect(() => {
if (!ayah) if (ayah) {
return setMs(ayah.ms);
setMs(ayah.ms); }
}, [ayah?.id]); }, [ayah?.id]);
useEffect(() => { useEffect(() => {
if (!ayah) if (!ayah) {
return return;
if (audioStatus === "play") } else if (audioStatus === "play") {
setMs(ayah.ms) setMs(ayah.ms);
}
}, [audioStatus]); }, [audioStatus]);
useEffect(() => { useEffect(() => {