s/readingTime/readTimeMs/g

This commit is contained in:
0x1eef 2022-11-01 23:28:03 -03:00
parent cbcb909ced
commit 36f21c8936
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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,
}
})
);