Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

Commit 77b7fec

Browse files
authored
Merge branch 'master' into master
2 parents fd55a6b + f517d5e commit 77b7fec

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/components/Line/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Line extends Component {
3232
// NOTE: Some 'word's are glyphs (jeem). Not words and should not be clicked for audio
3333
let wordAudioPosition = -1;
3434

35-
const text = line.map((word) => ( // eslint-disable-line
35+
const text = line.map(word => // eslint-disable-line
3636
<Word
3737
word={word}
3838
key={`${word.position}-${word.code}-${word.lineNum}`}
@@ -45,7 +45,7 @@ class Line extends Component {
4545
}
4646
useTextFont={useTextFont}
4747
/>
48-
));
48+
);
4949

5050
return (
5151
<span className={`${styles.line} text-center`}>
@@ -59,14 +59,15 @@ class Line extends Component {
5959

6060
debug(
6161
'component:Line',
62-
`Page: ${line[0].pageNum} - Line: ${line[0].lineNum} - Ayah: ${line[0].verseKey}`
62+
`Page: ${line[0].pageNum} - Line: ${line[0].lineNum} - Ayah: ${line[0]
63+
.verseKey}`
6364
);
6465

6566
return (
6667
<div className={`row ${styles.font} text-justify text-arabic`}>
6768
<div
6869
className="col-md-12 line-container"
69-
name={`ayah:${line[0].verseKey}`}
70+
name={`verse:${line[0].verseKey}`}
7071
>
7172
{this.renderText()}
7273
</div>

src/containers/Surah/index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ class Surah extends Component {
228228
</div>
229229
);
230230

231-
return isLoading ? <Loader isActive relative style={LoaderStyle} /> : noAyah;
231+
return isLoading
232+
? <Loader isActive relative style={LoaderStyle} />
233+
: noAyah;
232234
}
233235

234236
renderPagination() {
@@ -237,7 +239,8 @@ class Surah extends Component {
237239
isLoading,
238240
isEndOfSurah,
239241
chapter,
240-
options
242+
options,
243+
actions
241244
} = this.props;
242245
const translations = (options.translations || []).join(',');
243246

@@ -285,6 +288,10 @@ class Surah extends Component {
285288
<li className="text-center">
286289
<Link
287290
to={`/${chapter.chapterNumber}?translations=${translations}`}
291+
onClick={() =>
292+
actions.verse.setCurrentVerse(
293+
`${chapter.chapterNumber}:${this.getFirst()}`
294+
)}
288295
>
289296
<LocaleFormattedMessage
290297
id="chapter.goToBeginning"
@@ -306,7 +313,9 @@ class Surah extends Component {
306313
</li>}
307314
</ul>
308315
}
309-
loadingComponent={<Loader isActive={isLoading} relative style={LoaderStyle} />}
316+
loadingComponent={
317+
<Loader isActive={isLoading} relative style={LoaderStyle} />
318+
}
310319
/>
311320
);
312321
}

0 commit comments

Comments
 (0)