TheSurahPage.tsx: place Timer below Stream
This commit is contained in:
parent
4c0077da57
commit
efd2aeed23
2 changed files with 11 additions and 8 deletions
|
@ -21,8 +21,8 @@ export function Timer({surah, ayah, stream, setStream}: TimerProps) {
|
||||||
}
|
}
|
||||||
}, [ms]);
|
}, [ms]);
|
||||||
return (
|
return (
|
||||||
<span className="timer">
|
<div className="timer">
|
||||||
{(ms / 1000).toFixed(1)}
|
{(ms / 1000).toFixed(1)}
|
||||||
</span>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,16 +35,19 @@ function TheSurahPage({locale, surahId}: PageProps) {
|
||||||
<option value="moon">The Moon 🌛</option>
|
<option value="moon">The Moon 🌛</option>
|
||||||
<option value="leaf">The Leaf 🌿</option>
|
<option value="leaf">The Leaf 🌿</option>
|
||||||
</select>
|
</select>
|
||||||
<Timer
|
<span></span>
|
||||||
surah={surah}
|
|
||||||
ayah={surah.ayat[stream.length - 1]}
|
|
||||||
setStream={setStream}
|
|
||||||
stream={stream}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{streamIsLoaded && <AboutSurah surah={surah}/>}
|
{streamIsLoaded && <AboutSurah surah={surah}/>}
|
||||||
{streamIsLoaded && <Stream surah={surah} stream={stream}/>}
|
{streamIsLoaded && <Stream surah={surah} stream={stream}/>}
|
||||||
|
{streamIsLoaded && stream.length < surah.numberOfAyah &&
|
||||||
|
<Timer
|
||||||
|
surah={surah}
|
||||||
|
ayah={surah.ayat[stream.length - 1]}
|
||||||
|
setStream={setStream}
|
||||||
|
stream={stream}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue