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 production
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedre committed May 27, 2017
2 parents c632b81 + 75e4a1c commit 548d4e7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
19 changes: 19 additions & 0 deletions src/components/Footer/PdfFooter/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import Link from 'react-router/lib/Link';

const PdfFooter = () => (
<footer>
<div className="container">
<div className="row">
<div className="col-md-12">
<p className="text-center">
This PDF is exported from {' '}
<Link to="https://quran.com">Quran.com</Link>
</p>
</div>
</div>
</div>
</footer>
);

export default PdfFooter;
4 changes: 3 additions & 1 deletion src/containers/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class App extends Component {
const {
main,
nav,
footer,
children,
media,
footNote,
Expand Down Expand Up @@ -98,7 +99,7 @@ class App extends Component {
/>}
{children || main}
<SmartBanner title="The Noble Quran - القرآن الكريم" button="Install" />
<Footer />
{footer || <Footer />}
{__CLIENT__ &&
<Modal
bsSize="large"
Expand Down Expand Up @@ -152,6 +153,7 @@ App.propTypes = {
children: PropTypes.element,
main: PropTypes.element,
nav: PropTypes.element,
footer: PropTypes.element,
sidebar: PropTypes.element,
footNote: customPropTypes.footNoteType,
loadingFootNote: PropTypes.bool
Expand Down
24 changes: 13 additions & 11 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,19 @@ export default (store) => {
<Route
path="/:chapterId(/:range).pdf"
getComponents={(nextState, cb) =>
import('./containers/Pdf')
.then(module => cb(null, { main: module.default, nav: 'noscript' }))
.catch(err => console.trace(err))}
onEnter={checkValidChapterOrVerse}
/>

<Route
path="/:chapterId(/:range).pdf"
getComponents={(nextState, cb) =>
import(/* webpackChunkName: "pdf" */ './containers/Pdf')
.then(module => cb(null, { main: module.default, nav: 'noscript' }))
Promise.all([
import(/* webpackChunkName: "pdf" */ './containers/Pdf'),
import(
/* webpackChunkName: "pdf-footer" */ './components/Footer/PdfFooter'
)
])
.then(modules =>
cb(null, {
main: modules[0].default,
footer: modules[1].default,
nav: 'noscript'
})
)
.catch(err => console.trace(err))}
onEnter={checkValidChapterOrVerse}
/>
Expand Down

0 comments on commit 548d4e7

Please sign in to comment.