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

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
naveed-ahmad authored Jun 28, 2017
2 parents fd55a6b + f517d5e commit 77b7fec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/components/Line/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Line extends Component {
// NOTE: Some 'word's are glyphs (jeem). Not words and should not be clicked for audio
let wordAudioPosition = -1;

const text = line.map((word) => ( // eslint-disable-line
const text = line.map(word => // eslint-disable-line
<Word
word={word}
key={`${word.position}-${word.code}-${word.lineNum}`}
Expand All @@ -45,7 +45,7 @@ class Line extends Component {
}
useTextFont={useTextFont}
/>
));
);

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

debug(
'component:Line',
`Page: ${line[0].pageNum} - Line: ${line[0].lineNum} - Ayah: ${line[0].verseKey}`
`Page: ${line[0].pageNum} - Line: ${line[0].lineNum} - Ayah: ${line[0]
.verseKey}`
);

return (
<div className={`row ${styles.font} text-justify text-arabic`}>
<div
className="col-md-12 line-container"
name={`ayah:${line[0].verseKey}`}
name={`verse:${line[0].verseKey}`}
>
{this.renderText()}
</div>
Expand Down
15 changes: 12 additions & 3 deletions src/containers/Surah/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ class Surah extends Component {
</div>
);

return isLoading ? <Loader isActive relative style={LoaderStyle} /> : noAyah;
return isLoading
? <Loader isActive relative style={LoaderStyle} />
: noAyah;
}

renderPagination() {
Expand All @@ -237,7 +239,8 @@ class Surah extends Component {
isLoading,
isEndOfSurah,
chapter,
options
options,
actions
} = this.props;
const translations = (options.translations || []).join(',');

Expand Down Expand Up @@ -285,6 +288,10 @@ class Surah extends Component {
<li className="text-center">
<Link
to={`/${chapter.chapterNumber}?translations=${translations}`}
onClick={() =>
actions.verse.setCurrentVerse(
`${chapter.chapterNumber}:${this.getFirst()}`
)}
>
<LocaleFormattedMessage
id="chapter.goToBeginning"
Expand All @@ -306,7 +313,9 @@ class Surah extends Component {
</li>}
</ul>
}
loadingComponent={<Loader isActive={isLoading} relative style={LoaderStyle} />}
loadingComponent={
<Loader isActive={isLoading} relative style={LoaderStyle} />
}
/>
);
}
Expand Down

0 comments on commit 77b7fec

Please sign in to comment.