Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
383 lint-roller :bowtie:
  • Loading branch information
thabti committed Jul 10, 2016
commit c5622b17197c9d191edb6bae3d2ff3ce14ceb848
5 changes: 3 additions & 2 deletions src/components/Ayah/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default class Ayah extends Component {
isSearch: PropTypes.bool,
tooltip: PropTypes.string,
currentWord: PropTypes.any, // gets passed in an integer, null by default
onWordClick: PropTypes.func.isRequired
onWordClick: PropTypes.func.isRequired,
actions: PropTypes.object.isRequired
};

static defaultProps = {
Expand All @@ -46,7 +47,7 @@ export default class Ayah extends Component {

handlePlay(ayah) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

const{stop, setAyah, start} = this.props.actions;
const {stop, setAyah, start} = this.props.actions;

stop();
setAyah(ayah);
Expand Down
10 changes: 5 additions & 5 deletions src/containers/Surah/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, PropTypes } from 'react';
import Link from 'react-router/lib/Link';
// redux
import { bindActionCreators } from 'redux'
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { asyncConnect } from 'redux-connect';
import { push } from 'react-router-redux';
Expand Down Expand Up @@ -174,7 +174,7 @@ class Surah extends Component {
}

handleLazyLoadAyahs = (callback) => {
const { loadAyahs, ayahIds, surah, isEndOfSurah, options, actions } = this.props; // eslint-disable-line no-shadow, max-len
const { ayahIds, surah, isEndOfSurah, options, actions } = this.props; // eslint-disable-line no-shadow, max-len
const range = [this.getFirst(), this.getLast()];

let size = 10;
Expand Down Expand Up @@ -360,7 +360,7 @@ class Surah extends Component {
}

render() {
const { surah, surahs, ayahIds, options, actions } = this.props;
const { surah, surahs, ayahIds, options } = this.props;

debug('component:Surah', 'Render');

Expand Down Expand Up @@ -476,9 +476,9 @@ function mapDispatchToProps(dispatch) {
options: bindActionCreators(OptionsActions, dispatch),
ayah: bindActionCreators(AyahActions, dispatch),
audio: bindActionCreators(AudioActions, dispatch),
push: bindActionCreators(push, dispatch)
push: bindActionCreators(push, dispatch)
}
}
};
}

function mapStateToProps(state, ownProps) {
Expand Down
18 changes: 9 additions & 9 deletions src/redux/modules/audioplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ export default function reducer(state = initialState, action = {}) {
...state,
segments: {
...state.segments,
[surahId]: {
...state.segments[surahId],
[currentAyah]: buildSegments(state.segments[surahId][currentAyah])
}
},
currentAyah: currentAyah,
currentFile: state.files[surahId][currentAyah],
currentTime: 0
};
[surahId]: {
...state.segments[surahId],
[currentAyah]: buildSegments(state.segments[surahId][currentAyah])
}
},
currentAyah,
currentFile: state.files[surahId][currentAyah],
currentTime: 0
};
}

case PREVIOUS: {
Expand Down