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

Commit d94783c

Browse files
committed
Fix conflicts
2 parents b065df9 + 230eaf5 commit d94783c

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

src/components/Audioplayer/RepeatDropdown/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ class RepeatButton extends Component {
6161
value={repeat.from}
6262
onChange={(event) => {
6363
let to = parseInt(event.target.value, 10) + 3;
64-
to = to < chapter.ayat ? to : chapter.ayat;
64+
to = to < chapter.versesCount ? to : chapter.versesCount;
65+
6566
setRepeat({
6667
...repeat,
6768
from: parseInt(event.target.value, 10),
@@ -71,7 +72,7 @@ class RepeatButton extends Component {
7172
>
7273
{
7374
array.reduce((options, ayah, index) => {
74-
if (index + 1 < chapter.ayat) { // Exclude last verse
75+
if (index + 1 < chapter.versesCount) { // Exclude last verse
7576
options.push(
7677
<option key={index} value={index + 1}>
7778
{index + 1}
@@ -97,7 +98,7 @@ class RepeatButton extends Component {
9798
>
9899
{
99100
array.reduce((options, ayah, index) => {
100-
if ((repeat.from ? repeat.from : 1) < index + 1 && index + 1 <= chapter.ayat) {
101+
if ((repeat.from ? repeat.from : 1) < index + 1 && index + 1 <= chapter.versesCount) { // eslint-disable-line max-len
101102
options.push(
102103
<option key={index} value={index + 1}>
103104
{index + 1}

src/containers/Surah/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -411,17 +411,17 @@ function mapStateToProps(state, ownProps) {
411411
const verseIds = new Set(verseArray);
412412
const lastAyahInArray = verseArray.slice(-1)[0];
413413
const isSingleAyah = !!ownProps.params.range && !ownProps.params.range.includes('-');
414-
414+
const currentVerse = state.audioplayer.currentVerse || Object.keys(verses)[0];
415415

416416
return {
417417
chapter,
418418
verses,
419419
verseIds,
420420
isSingleAyah,
421+
currentVerse,
421422
info: state.chapters.infos[ownProps.params.chapterId],
422423
isStarted: state.audioplayer.isStarted,
423424
isPlaying: state.audioplayer.isPlaying,
424-
currentVerse: state.audioplayer.currentVerse,
425425
isAuthenticated: state.auth.loaded,
426426
currentWord: state.verses.currentWord,
427427
isEndOfSurah: lastAyahInArray === chapter.versesCount,

src/helpers/Html.js

+14
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ const Html = ({ store, component, assets }) => {
3434
</head>
3535
<body>
3636
<div id="app" dangerouslySetInnerHTML={{ __html: content }} />
37+
<style
38+
dangerouslySetInnerHTML={{
39+
__html: '.async-hide { opacity: 0 !important}'
40+
}}
41+
/>
42+
<script
43+
dangerouslySetInnerHTML={{
44+
__html: `(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
45+
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
46+
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
47+
})(window,document.documentElement,'async-hide','dataLayer',4000,
48+
{'GTM-PNMFTW3':true});`
49+
}}
50+
/>
3751
<script
3852
dangerouslySetInnerHTML={{
3953
__html: `(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

src/redux/modules/lines.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ export default function reducer(state = initialState, action = {}) {
3333
const ayah = ayahs[ayahId];
3434

3535
ayah.words.forEach((word) => {
36-
if (lines[`${word.pageNum}-${word.lineNum}`]) {
37-
const isInArray = lines[`${word.pageNum}-${word.lineNum}`].find((item) => {
38-
const itemChecksum = `${item.lineNum}${item.code}${item.verseKey}${item.position}`;
39-
const dataChecksum = `${word.lineNum}${word.code}${word.verseKey}${item.position}`;
36+
if (lines[`${word.pageNumber}-${word.lineNumber}`]) {
37+
const isInArray = lines[`${word.pageNumber}-${word.lineNumber}`].find((item) => {
38+
const itemChecksum = `${item.lineNumber}${item.code}${item.verseKey}${item.position}`;
39+
const dataChecksum = `${word.lineNumber}${word.code}${word.verseKey}${item.position}`;
4040

4141
return itemChecksum === dataChecksum;
4242
});
4343

4444
if (!isInArray) {
45-
lines[`${word.pageNum}-${word.lineNum}`].push(word);
45+
lines[`${word.pageNumber}-${word.lineNumber}`].push(word);
4646
}
4747
} else {
48-
lines[`${word.pageNum}-${word.lineNum}`] = [word];
48+
lines[`${word.pageNumber}-${word.lineNumber}`] = [word];
4949
}
5050
});
5151
});

0 commit comments

Comments
 (0)