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

Commit

Permalink
Merge branch 'master' into webpack-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahalwy authored Jan 20, 2017
2 parents ef8a5e5 + 0b8d0f7 commit 6ab9ddb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
21 changes: 12 additions & 9 deletions src/components/Line/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ export default class Line extends React.Component {
isPlaying: PropTypes.bool
};

shouldComponentUpdate(nextProps) {
const conditions = [
this.props.currentAyah !== nextProps.currentAyah,
this.props.line !== nextProps.line,
this.props.isPlaying !== nextProps.isPlaying
];

return conditions.some(condition => condition);
}
// NOTE: this is commented out as it caused problems with 55:31 with missing text.
// shouldComponentUpdate(nextProps) {
// const conditions = [
// this.props.currentAyah !== nextProps.currentAyah,
// this.props.line !== nextProps.line,
// this.props.isPlaying !== nextProps.isPlaying
// ];
//
// console.log(conditions, conditions.some(condition => condition));
//
// return conditions.some(condition => condition);
// }

renderText() {
const { tooltip, currentAyah, audioActions, isPlaying, line } = this.props;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Word/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class Word extends React.Component {
const className = `${word.className} ${highlight} ${word.highlight ? word.highlight : ''}`;

if (word.charTypeId === CHAR_TYPE_WORD) {
id = `word-${word.ayahKey.replace(/:/, '-')}-${audioPosition}`;
id = `word-${word.ayahKey.replace(/:/, '-')}-${audioPosition || word.position}`;
}

return (
Expand Down
5 changes: 2 additions & 3 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ const config = {
{ rel: 'apple-touch-icon', sizes: '152x152', href: '/apple-touch-icon-152x152.png' },
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon-180x180.png' },
{ rel: 'preconnect', href: 'https://quran-1f14.kxcdn.com', crossOrigin: '' },
{ rel: 'preconnect', href: 'https://assets-1f14.kxcdn.com', crossOrigin: '' },
{ rel: 'stylesheet', href: 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' }
{ rel: 'preconnect', href: 'https://assets-1f14.kxcdn.com', crossOrigin: '' }
],
/* SEO: https://developers.google.com/structured-data/slsb-overview#markup_examples */
/* SEO: https://developers.google.com/structured-data/site-name#markup_requirements */
script: [
{ src: 'https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.en' },
{ src: 'https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.en', async: '', defer: '' },
{
type: 'application/ld+json',
innerHTML: `{
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/Html.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ const Html = ({ store, component, assets }) => {
{Object.keys(assets.javascript).map((script, i) =>
<script src={assets.javascript[script]} key={i} />
)}
{
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
}
</body>
</html>
);
Expand Down
1 change: 0 additions & 1 deletion src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ $tracker-height-hundred-boolean: false;

$font-family-sans-serif: 'Montserrat', sans-serif;
$font-montserrat: $font-family-sans-serif;
$font-awesome: 'FontAwesome', serif;
$icon-font-path: "bootstrap-sass/assets/fonts";

@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/variables";

0 comments on commit 6ab9ddb

Please sign in to comment.