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

Fix beginning of surah button not reseting the player (#674) #821

Merged
merged 3 commits into from
Jun 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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