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

Commit

Permalink
lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
naveed-ahmad committed Apr 9, 2017
1 parent 4e399f4 commit f060681
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
16 changes: 9 additions & 7 deletions src/components/Verse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ class Verse extends Component {
componentDidMount() {
const { verse, audio, isSearched } = this.props;

!isSearched && this.props.loadAudio({
chapterId: verse.chapterId,
verseId: verse.id,
verseKey: verse.verseKey,
audio
});
if (!isSearched) {
this.props.loadAudio({
chapterId: verse.chapterId,
verseId: verse.id,
verseKey: verse.verseKey,
audio
});
}
}

// TODO: Should this belong here?
Expand Down Expand Up @@ -341,4 +343,4 @@ class Verse extends Component {
}
}

export default connect(state => ({userAgent: state.options.userAgent}), { loadAudio })(Verse);
export default connect(state => ({ userAgent: state.options.userAgent }), { loadAudio })(Verse);
5 changes: 2 additions & 3 deletions src/containers/Search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { search } from 'redux/actions/search.js';

import LocaleFormattedMessage from 'components/LocaleFormattedMessage';

import { verseType, optionsType } from 'types';
import { optionsType } from 'types';

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

Expand All @@ -30,7 +30,6 @@ class Search extends Component {
perPage: PropTypes.number,
query: PropTypes.string,
results: PropTypes.arrayOf(PropTypes.string),
entities: PropTypes.arrayOf(verseType),
push: PropTypes.func.isRequired,
location: PropTypes.shape({ // eslint-disable-line
q: PropTypes.string,
Expand Down Expand Up @@ -120,7 +119,7 @@ class Search extends Component {
}

renderBody() {
const { isErrored, isLoading, results, entities, options, location: { query } } = this.props;
const { isErrored, isLoading, results, options, location: { query } } = this.props;

if (isLoading) {
return <Loader isActive={isLoading} />;
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Surah/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ export const versesConnect = ({ store: { dispatch, getState }, params, location
dispatch(clearCurrent(chapterId)); // In the case where you go to same surah but later ayahs.

if (__CLIENT__) {
dispatch(loadVerses(chapterId, paging, { translations: translations }, getState().options));
dispatch(loadVerses(chapterId, paging, { translations }, getState().options));
return true;
}

return dispatch(loadVerses(chapterId, paging, { translations: translations }, getState().options));
return dispatch(loadVerses(chapterId, paging, { translations }, getState().options));
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion src/redux/actions/verses.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function prepareParams(params, options) {
translations = options.translations || defaultOptions.translations;
}

return { translations };
return { translations };
}

export function load(id, paging, params, options = defaultOptions) {
Expand Down
19 changes: 9 additions & 10 deletions src/server/config/sitemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ export default (server) => {

translations.forEach((translation) => {
urls.push({
url: `/${chapter.id}/${ ayahId }/${ translation.slug || translation.id }`,
url: `/${chapter.id}/${ayahId}/${translation.slug || translation.id}`,
changefreq: 'weekly',
priority: 1
});
});

urls.push({
url: `/${chapter.id}/${ ayahId }`,
url: `/${chapter.id}/${ayahId}`,
changefreq: 'weekly',
priority: 1
});

urls.push({
url: `/${chapter.id}/${ ayahId }-${ ayahId + 9 }`,
url: `/${chapter.id}/${ayahId}-${ayahId + 9}`,
changefreq: 'weekly',
priority: 1
});
Expand Down Expand Up @@ -78,13 +78,12 @@ export default (server) => {
cacheTime: 600000, // 600 sec cache period
urls: [
...urls,
{url: '/about', changefreq: 'monthly', priority: 0.3},
{url: '/contactus', changefreq: 'monthly', priority: 0.3},
{url: '/contact', changefreq: 'monthly', priority: 0.3},
{url: '/donations', changefreq: 'monthly', priority: 0.3},
{url: '/contributions', changefreq: 'monthly', priority: 0.3},

{url: '/search', changefreq: 'weekly', priority: 0.8}
{ url: '/about', changefreq: 'monthly', priority: 0.3 },
{ url: '/contactus', changefreq: 'monthly', priority: 0.3 },
{ url: '/contact', changefreq: 'monthly', priority: 0.3 },
{ url: '/donations', changefreq: 'monthly', priority: 0.3 },
{ url: '/contributions', changefreq: 'monthly', priority: 0.3 },
{ url: '/search', changefreq: 'weekly', priority: 0.8 }
]
});

Expand Down

0 comments on commit f060681

Please sign in to comment.