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
Type folder removed
  • Loading branch information
hasibsahibzada committed Apr 9, 2017
commit c8abef580ea286dbd5c04588c142e8a6b07f06e7
12 changes: 6 additions & 6 deletions src/components/Audioplayer/RepeatDropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RepeatButton extends Component {
from: current,
to: current
});
}
};

handleNavChange = (nav) => {
const { setRepeat, current } = this.props;
Expand Down Expand Up @@ -270,11 +270,11 @@ class RepeatButton extends Component {
}

RepeatButton.propTypes = {
chapter: surahType,
repeat: customPropTypes.timeInterval,
setRepeat: PropTypes.func.isRequired,
current: PropTypes.number.isRequired,
intl: intlShape.isRequired
chapter: surahType,
repeat: customPropTypes.timeInterval,
setRepeat: PropTypes.func.isRequired,
current: PropTypes.number.isRequired,
intl: intlShape.isRequired
};

export default injectIntl(RepeatButton);
8 changes: 4 additions & 4 deletions src/components/Audioplayer/Segments/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class Segments extends Component {
}

Segments.propTypes = {
segments: customPropTypes.segments.isRequired,
currentVerse: PropTypes.string,
currentTime: PropTypes.number
segments: customPropTypes.segments.isRequired,
currentVerse: PropTypes.string,
currentTime: PropTypes.number
};

export default Segments;
export default Segments;
2 changes: 1 addition & 1 deletion src/components/Audioplayer/Track/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class Track extends Component {
);

return onTrackChange(fraction);
}
};

render() {
const { progress } = this.props;
Expand Down
52 changes: 26 additions & 26 deletions src/components/Audioplayer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,32 +477,32 @@ const mapStateToProps = (state, ownProps) => {
};

Audioplayer.propTypes = {
className: PropTypes.string,
chapter: customPropTypes.surahType,
onLoadAyahs: PropTypes.func.isRequired,
segments: customPropTypes.segments,
// NOTE: should be PropTypes.instanceOf(Audio) but not on server.
files: PropTypes.object, // eslint-disable-line
currentVerse: PropTypes.string,
buildOnClient: PropTypes.func.isRequired,
isLoadedOnClient: PropTypes.bool.isRequired,
isLoading: PropTypes.bool.isRequired,
play: PropTypes.func.isRequired,
pause: PropTypes.func.isRequired,
next: PropTypes.func.isRequired, // eslint-disable-line
previous: PropTypes.func.isRequired, // eslint-disable-line
update: PropTypes.func.isRequired,
repeat: customPropTypes.timeInterval.isRequired,
shouldScroll: PropTypes.bool.isRequired,
setRepeat: PropTypes.func.isRequired,
setAyah: PropTypes.func.isRequired,
toggleScroll: PropTypes.func.isRequired,
isPlaying: PropTypes.bool,
currentTime: PropTypes.number,
duration: PropTypes.number,
// NOTE: should be PropTypes.instanceOf(Audio) but not on server.
currentFile: PropTypes.any, // eslint-disable-line
startVerse: customPropTypes.verseType // eslint-disable-line
className: PropTypes.string,
chapter: customPropTypes.surahType,
onLoadAyahs: PropTypes.func.isRequired,
segments: customPropTypes.segments,
// NOTE: should be PropTypes.instanceOf(Audio) but not on server.
files: PropTypes.object, // eslint-disable-line
currentVerse: PropTypes.string,
buildOnClient: PropTypes.func.isRequired,
isLoadedOnClient: PropTypes.bool.isRequired,
isLoading: PropTypes.bool.isRequired,
play: PropTypes.func.isRequired,
pause: PropTypes.func.isRequired,
next: PropTypes.func.isRequired, // eslint-disable-line
previous: PropTypes.func.isRequired, // eslint-disable-line
update: PropTypes.func.isRequired,
repeat: customPropTypes.timeInterval.isRequired,
shouldScroll: PropTypes.bool.isRequired,
setRepeat: PropTypes.func.isRequired,
setAyah: PropTypes.func.isRequired,
toggleScroll: PropTypes.func.isRequired,
isPlaying: PropTypes.bool,
currentTime: PropTypes.number,
duration: PropTypes.number,
// NOTE: should be PropTypes.instanceOf(Audio) but not on server.
currentFile: PropTypes.any, // eslint-disable-line
startVerse: customPropTypes.verseType // eslint-disable-line
};

export default connect(mapStateToProps, AudioActions)(Audioplayer);
8 changes: 4 additions & 4 deletions src/components/ContentDropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ class ContentDropdown extends Component {
}

ContentDropdown.propTypes = {
onOptionChange: PropTypes.func.isRequired,
translations: PropTypes.arrayOf(PropTypes.number).isRequired,
translationOptions: customPropTypes.translationOptions,
loadTranslations: PropTypes.func.isRequired
onOptionChange: PropTypes.func.isRequired,
translations: PropTypes.arrayOf(PropTypes.number).isRequired,
translationOptions: customPropTypes.translationOptions,
loadTranslations: PropTypes.func.isRequired
};

export default connect(state => ({
Expand Down
6 changes: 3 additions & 3 deletions src/components/Copy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class Copy extends Component {
}
}

Copy.proptypes = {
text: PropTypes.string.isRequired,
verseKey: PropTypes.string.isRequired,
Copy.propTypes = {
text: PropTypes.string.isRequired,
verseKey: PropTypes.string.isRequired,
};

export default Copy;
4 changes: 2 additions & 2 deletions src/components/FontSizeDropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class FontSizeDropdown extends Component {
}

FontSizeDropdown.propTypes = {
onOptionChange: PropTypes.func,
fontSize: customPropTypes.fontSize.isRequired
onOptionChange: PropTypes.func,
fontSize: customPropTypes.fontSize.isRequired
};

export default FontSizeDropdown;
4 changes: 2 additions & 2 deletions src/components/FontStyles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class FontStyles extends Component {
}

FontStyles.propTypes = {
fontFaces: PropTypes.objectOf(PropTypes.bool).isRequired,
load: PropTypes.func.isRequired
fontFaces: PropTypes.objectOf(PropTypes.bool).isRequired,
load: PropTypes.func.isRequired
};

export default FontStyles;
12 changes: 6 additions & 6 deletions src/components/GlobalNav/Surah/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ function mapStateToProps(state, ownProps) {
}

GlobalNavSurah.propTypes = {
chapter: customPropTypes.surahType.isRequired,
chapaters: customPropTypes.chapters.isRequired,
options: customPropTypes.optionsType.isRequired,
setOption: PropTypes.func.isRequired,
versesIds: PropTypes.instanceOf(Set),
load: PropTypes.func.isRequired
chapter: customPropTypes.surahType.isRequired,
chapters: customPropTypes.chapters.isRequired,
options: customPropTypes.optionsType.isRequired,
setOption: PropTypes.func.isRequired,
versesIds: PropTypes.instanceOf(Set),
load: PropTypes.func.isRequired
};

export default connect(mapStateToProps, { ...OptionsActions, load })(GlobalNavSurah);
14 changes: 7 additions & 7 deletions src/components/GlobalNav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ class GlobalNav extends Component {

GlobalNav.propTypes = {
// handleToggleSidebar: PropTypes.func.isRequired,
leftControls: PropTypes.arrayOf(PropTypes.element),
rightControls: PropTypes.arrayOf(PropTypes.element),
handleSidebarToggle: PropTypes.func.isRequired,
isStatic: PropTypes.bool.isRequired,
user: userType,
location: customPropTypes.location
leftControls: PropTypes.arrayOf(PropTypes.element),
rightControls: PropTypes.arrayOf(PropTypes.element),
handleSidebarToggle: PropTypes.func.isRequired,
isStatic: PropTypes.bool.isRequired,
user: userType,
location: customPropTypes.location
};

GlobalNav.defaultProps = {
isStatic: false
isStatic: false
};

export default connect(
Expand Down
11 changes: 6 additions & 5 deletions src/components/GlobalSidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Navbar from 'react-bootstrap/lib/Navbar';
import LocaleFormattedMessage from 'components/LocaleFormattedMessage';

const styles = require('./style.scss');

const NavbarHeader = Navbar.Header;

class GlobalSidebar extends Component {
Expand Down Expand Up @@ -106,14 +107,14 @@ class GlobalSidebar extends Component {
}

GlobalSidebar.propTypes = {
open: PropTypes.bool.isRequired,
handleOpen: PropTypes.func,
settingsModalProps: PropTypes.object, // eslint-disable-line
children: PropTypes.node
open: PropTypes.bool.isRequired,
handleOpen: PropTypes.func,
settingsModalProps: PropTypes.object, // eslint-disable-line
children: PropTypes.node
};

GlobalSidebar.defaultProps = {
open: false
open: false
};

export default GlobalSidebar;
2 changes: 1 addition & 1 deletion src/components/Home/SurahsList/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { PropTypes } from 'react';
import React from 'react';
import * as customPropTypes from 'customPropTypes';
import debug from 'helpers/debug';
import Link from 'react-router/lib/Link';
Expand Down
2 changes: 1 addition & 1 deletion src/components/IndexHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class IndexHeader extends Component {
}

IndexHeader.propTypes = {
noSearch: PropTypes.bool
noSearch: PropTypes.bool
};

export default IndexHeader;
20 changes: 10 additions & 10 deletions src/components/LazyLoad/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ class LazyLoad extends Component {
}

LazyLoad.propTypes = {
isLoading: PropTypes.bool.isRequired,
isEnd: PropTypes.bool.isRequired,
onLazyLoad: PropTypes.func.isRequired,
loadingComponent: PropTypes.element,
endComponent: PropTypes.element,
offset: PropTypes.number
isLoading: PropTypes.bool.isRequired,
isEnd: PropTypes.bool.isRequired,
onLazyLoad: PropTypes.func.isRequired,
loadingComponent: PropTypes.element,
endComponent: PropTypes.element,
offset: PropTypes.number
};

LazyLoad.defaultProps = {
loadingComponent: 'Loading...',
endComponent: 'End.',
offset: 1000
loadingComponent: 'Loading...',
endComponent: 'End.',
offset: 1000
};

export default LazyLoad;
export default LazyLoad;
12 changes: 6 additions & 6 deletions src/components/Line/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ class Line extends React.Component {
}

Line.propTypes = {
line: customPropTypes.line.isRequired,
tooltip: PropTypes.string,
currentVerse: PropTypes.string.isRequired,
audioActions: customPropTypes.audioActions,
isPlaying: PropTypes.bool,
useTextFont: PropTypes.bool
line: customPropTypes.line.isRequired,
tooltip: PropTypes.string,
currentVerse: PropTypes.string.isRequired,
audioActions: customPropTypes.audioActions,
isPlaying: PropTypes.bool,
useTextFont: PropTypes.bool
};

export default Line;
2 changes: 1 addition & 1 deletion src/components/LocaleSwitcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class LocaleSwitcher extends Component {
}

LocaleSwitcher.propTypes = {
className: PropTypes.string
className: PropTypes.string
};

export default LocaleSwitcher;
4 changes: 2 additions & 2 deletions src/components/NightModeToggle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class NightModeToggle extends Component {
}

NightModeToggle.propTypes = {
isNightMode: PropTypes.bool.isRequired,
onToggle: PropTypes.func.isRequired
isNightMode: PropTypes.bool.isRequired,
onToggle: PropTypes.func.isRequired
};

export default NightModeToggle;
8 changes: 4 additions & 4 deletions src/components/ReciterDropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class ReciterDropdown extends Component {
}

ReciterDropdown.propTypes = {
onOptionChange: PropTypes.func,
audio: PropTypes.number,
loadRecitations: PropTypes.func.isRequired,
recitations: customPropTypes.recitations
onOptionChange: PropTypes.func,
audio: PropTypes.number,
loadRecitations: PropTypes.func.isRequired,
recitations: customPropTypes.recitations
};

export default connect(state => ({
Expand Down
21 changes: 11 additions & 10 deletions src/components/SearchAutocomplete/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { push } from 'react-router-redux';
import { suggest } from 'redux/actions/suggest';

const styles = require('./style.scss');

const ayahRegex = /^(\d+)(?::(\d+))?$/;

class SearchAutocomplete extends Component {
Expand Down Expand Up @@ -200,19 +201,19 @@ function mapStateToProps(state, ownProps) {
}

SearchAutocomplete.propTypes = {
chapters: customPropTypes.chapters.isRequired,
value: PropTypes.string,
// TODO: This should not be doing html stuff. Should use react onKeydown.
input: PropTypes.any, // eslint-disable-line
push: PropTypes.func.isRequired,
suggest: PropTypes.func.isRequired,
suggestions: customPropTypes.suggestions,
lang: PropTypes.string,
delay: PropTypes.number,
chapters: customPropTypes.chapters.isRequired,
value: PropTypes.string,
// TODO: This should not be doing html stuff. Should use react onKeydown.
input: PropTypes.any, // eslint-disable-line
push: PropTypes.func.isRequired,
suggest: PropTypes.func.isRequired,
suggestions: customPropTypes.suggestions,
lang: PropTypes.string,
delay: PropTypes.number,
};

SearchAutocomplete.defaultProps = {
delay: 200
delay: 200
};

export default connect(mapStateToProps, { push, suggest })(SearchAutocomplete);
6 changes: 3 additions & 3 deletions src/components/SearchInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ class SearchInput extends Component {
}

SearchInput.propTypes = {
push: PropTypes.func.isRequired,
className: PropTypes.string,
intl: intlShape.isRequired
push: PropTypes.func.isRequired,
className: PropTypes.string,
intl: intlShape.isRequired
};

export default injectIntl(connect(null, { push })(SearchInput));
1 change: 1 addition & 0 deletions src/components/Share/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ShareButtons, generateShareIcon } from 'react-share';
import * as customPropTypes from 'customPropTypes';

const styles = require('./style.scss');

const { FacebookShareButton, TwitterShareButton } = ShareButtons;
const FacebookIcon = generateShareIcon('facebook');
const TwitterIcon = generateShareIcon('twitter');
Expand Down
Loading