diff --git a/src/js/components/TheQuran/Timer.tsx b/src/js/components/TheQuran/Timer.tsx index 86da4937b..a59b383ef 100644 --- a/src/js/components/TheQuran/Timer.tsx +++ b/src/js/components/TheQuran/Timer.tsx @@ -9,8 +9,8 @@ type TimerProps = { }; export function Timer({surah, ayah, stream, setStream}: TimerProps) { - const [ms, setMs] = useState(ayah.readingTime); - useEffect(() => setMs(ayah.readingTime), [ayah]); + const [ms, setMs] = useState(ayah.readTimeMs); + useEffect(() => setMs(ayah.readTimeMs), [ayah]); useEffect(() => { if (stream.length === surah.ayat.length) { return; diff --git a/src/js/lib/Quran/Surah.ts b/src/js/lib/Quran/Surah.ts index 0c6c21b52..93df14c31 100644 --- a/src/js/lib/Quran/Surah.ts +++ b/src/js/lib/Quran/Surah.ts @@ -7,7 +7,7 @@ type SurahDetails = { slug: string, codepoints: Array } -export type Ayah = {id: number, text: string, readingTime: number}; +export type Ayah = {id: number, text: string, readTimeMs: number}; export type Ayat = Array; export class Surah { @@ -20,7 +20,7 @@ export class Surah { ayat.map(([id, text]) => { return { id, text, - readingTime: text.split(" ").length * 500, + readTimeMs: text.split(" ").length * 500, } }) );