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) {
|
export function Timer({surah, ayah, stream, setStream}: TimerProps) {
|
||||||
const [ms, setMs] = useState(ayah.readingTime);
|
const [ms, setMs] = useState(ayah.readTimeMs);
|
||||||
useEffect(() => setMs(ayah.readingTime), [ayah]);
|
useEffect(() => setMs(ayah.readTimeMs), [ayah]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (stream.length === surah.ayat.length) {
|
if (stream.length === surah.ayat.length) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -7,7 +7,7 @@ type SurahDetails = {
|
||||||
slug: string,
|
slug: string,
|
||||||
codepoints: Array<number>
|
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 type Ayat = Array<Ayah>;
|
||||||
|
|
||||||
export class Surah {
|
export class Surah {
|
||||||
|
@ -20,7 +20,7 @@ export class Surah {
|
||||||
ayat.map(([id, text]) => {
|
ayat.map(([id, text]) => {
|
||||||
return {
|
return {
|
||||||
id, text,
|
id, text,
|
||||||
readingTime: text.split(" ").length * 500,
|
readTimeMs: text.split(" ").length * 500,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue