s/readingTime/readTimeMs/g
This commit is contained in:
parent
cbcb909ced
commit
36f21c8936
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -7,7 +7,7 @@ type SurahDetails = {
|
|||
slug: string,
|
||||
codepoints: Array<number>
|
||||
}
|
||||
export type Ayah = {id: number, text: string, readingTime: number};
|
||||
export type Ayah = {id: number, text: string, readTimeMs: number};
|
||||
export type Ayat = Array<Ayah>;
|
||||
|
||||
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,
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue