This repository was archived by the owner on Jun 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +35
-12
lines changed Expand file tree Collapse file tree 3 files changed +35
-12
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import Link from 'react-router/lib/Link' ;
3+
4+ const PdfFooter = ( ) => (
5+ < footer >
6+ < div className = "container" >
7+ < div className = "row" >
8+ < div className = "col-md-12" >
9+ < p className = "text-center" >
10+ This PDF is exported from { ' ' }
11+ < Link to = "https://quran.com" > Quran.com</ Link >
12+ </ p >
13+ </ div >
14+ </ div >
15+ </ div >
16+ </ footer >
17+ ) ;
18+
19+ export default PdfFooter ;
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class App extends Component {
5353 const {
5454 main,
5555 nav,
56+ footer,
5657 children,
5758 media,
5859 footNote,
@@ -98,7 +99,7 @@ class App extends Component {
9899 /> }
99100 { children || main }
100101 < SmartBanner title = "The Noble Quran - القرآن الكريم" button = "Install" />
101- < Footer />
102+ { footer || < Footer /> }
102103 { __CLIENT__ &&
103104 < Modal
104105 bsSize = "large"
@@ -152,6 +153,7 @@ App.propTypes = {
152153 children : PropTypes . element ,
153154 main : PropTypes . element ,
154155 nav : PropTypes . element ,
156+ footer : PropTypes . element ,
155157 sidebar : PropTypes . element ,
156158 footNote : customPropTypes . footNoteType ,
157159 loadingFootNote : PropTypes . bool
Original file line number Diff line number Diff line change @@ -173,17 +173,19 @@ export default (store) => {
173173 < Route
174174 path = "/:chapterId(/:range).pdf"
175175 getComponents = { ( nextState , cb ) =>
176- import ( './containers/Pdf' )
177- . then ( module => cb ( null , { main : module . default , nav : 'noscript' } ) )
178- . catch ( err => console . trace ( err ) ) }
179- onEnter = { checkValidChapterOrVerse }
180- />
181-
182- < Route
183- path = "/:chapterId(/:range).pdf"
184- getComponents = { ( nextState , cb ) =>
185- import ( /* webpackChunkName: "pdf" */ './containers/Pdf' )
186- . then ( module => cb ( null , { main : module . default , nav : 'noscript' } ) )
176+ Promise . all ( [
177+ import ( /* webpackChunkName: "pdf" */ './containers/Pdf' ) ,
178+ import (
179+ /* webpackChunkName: "pdf-footer" */ './components/Footer/PdfFooter'
180+ )
181+ ] )
182+ . then ( modules =>
183+ cb ( null , {
184+ main : modules [ 0 ] . default ,
185+ footer : modules [ 1 ] . default ,
186+ nav : 'noscript'
187+ } )
188+ )
187189 . catch ( err => console . trace ( err ) ) }
188190 onEnter = { checkValidChapterOrVerse }
189191 />
You can’t perform that action at this time.
0 commit comments