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

Commit

Permalink
Fix beginning of surah button not reseting the player (#674) (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
azeezolaniran2016 authored and mmahalwy committed Jun 27, 2017
1 parent d062d2f commit f517d5e
Showing 1 changed file with 12 additions and 3 deletions.
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 f517d5e

Please sign in to comment.