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]);
|
||||
return (
|
||||
<span className="timer">
|
||||
<div className="timer">
|
||||
{(ms / 1000).toFixed(1)}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -35,16 +35,19 @@ function TheSurahPage({locale, surahId}: PageProps) {
|
|||
<option value="moon">The Moon 🌛</option>
|
||||
<option value="leaf">The Leaf 🌿</option>
|
||||
</select>
|
||||
<Timer
|
||||
surah={surah}
|
||||
ayah={surah.ayat[stream.length - 1]}
|
||||
setStream={setStream}
|
||||
stream={stream}
|
||||
/>
|
||||
<span></span>
|
||||
</div>
|
||||
}
|
||||
{streamIsLoaded && <AboutSurah surah={surah}/>}
|
||||
{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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue