This repository was archived by the owner on Jun 28, 2021. It is now read-only.
File tree 3 files changed +35
-12
lines changed 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 {
53
53
const {
54
54
main,
55
55
nav,
56
+ footer,
56
57
children,
57
58
media,
58
59
footNote,
@@ -98,7 +99,7 @@ class App extends Component {
98
99
/> }
99
100
{ children || main }
100
101
< SmartBanner title = "The Noble Quran - القرآن الكريم" button = "Install" />
101
- < Footer />
102
+ { footer || < Footer /> }
102
103
{ __CLIENT__ &&
103
104
< Modal
104
105
bsSize = "large"
@@ -152,6 +153,7 @@ App.propTypes = {
152
153
children : PropTypes . element ,
153
154
main : PropTypes . element ,
154
155
nav : PropTypes . element ,
156
+ footer : PropTypes . element ,
155
157
sidebar : PropTypes . element ,
156
158
footNote : customPropTypes . footNoteType ,
157
159
loadingFootNote : PropTypes . bool
Original file line number Diff line number Diff line change @@ -173,17 +173,19 @@ export default (store) => {
173
173
< Route
174
174
path = "/:chapterId(/:range).pdf"
175
175
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
+ )
187
189
. catch ( err => console . trace ( err ) ) }
188
190
onEnter = { checkValidChapterOrVerse }
189
191
/>
You can’t perform that action at this time.
0 commit comments