File tree 3 files changed +23
-15
lines changed
3 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const PageComponent = universal(
29
29
30
30
class App extends PureComponent {
31
31
render ( ) {
32
- const { route, loggedIn, metadata } = this . props ;
32
+ const { route, loggedIn, metadata, isGFW } = this . props ;
33
33
const { component, embed } = route ;
34
34
const isMapPage = component === 'map' ;
35
35
return (
@@ -68,17 +68,18 @@ class App extends PureComponent {
68
68
/>
69
69
</ div >
70
70
{ ! embed && < MyGFWProvider /> }
71
- { embed && (
72
- < div className = "embed-footer" >
73
- < p > For more info</ p >
74
- < Button
75
- className = "embed-btn"
76
- extLink = { window . location . href . replace ( '/embed' , '' ) }
77
- >
78
- EXPLORE ON GFW
79
- </ Button >
80
- </ div >
81
- ) }
71
+ { embed &&
72
+ ! isGFW && (
73
+ < div className = "embed-footer" >
74
+ < p > For more info</ p >
75
+ < Button
76
+ className = "embed-btn"
77
+ extLink = { window . location . href . replace ( '/embed' , '' ) }
78
+ >
79
+ EXPLORE ON GFW
80
+ </ Button >
81
+ </ div >
82
+ ) }
82
83
< Meta { ...metadata } />
83
84
</ div >
84
85
) }
@@ -90,6 +91,7 @@ class App extends PureComponent {
90
91
App . propTypes = {
91
92
route : PropTypes . object . isRequired ,
92
93
loggedIn : PropTypes . bool ,
94
+ isGFW : PropTypes . bool ,
93
95
metadata : PropTypes . object
94
96
} ;
95
97
Original file line number Diff line number Diff line change @@ -6,13 +6,18 @@ import { buildFullLocationName } from 'utils/format';
6
6
7
7
const selectLoggedIn = state => ! isEmpty ( state . myGfw . data ) || null ;
8
8
const selectLocation = state => state . location && state . location . payload ;
9
+ const selectQuery = state => state . location && state . location . query ;
9
10
const selectedCountries = state => state . countryData . countries ;
10
11
const selectedRegions = state => state . countryData . regions ;
11
12
const selectedSubRegion = state => state . countryData . subRegions ;
12
13
const selectPageLocation = state =>
13
14
state . location && state . location . routesMap [ state . location . type ] ;
14
15
15
- // get lists selected
16
+ export const getIsGFW = createSelector (
17
+ selectQuery ,
18
+ query => query && query . gfw
19
+ ) ;
20
+
16
21
export const getMetadata = createSelector (
17
22
[
18
23
selectPageLocation ,
@@ -53,5 +58,6 @@ export const getMetadata = createSelector(
53
58
export const getPageProps = createStructuredSelector ( {
54
59
loggedIn : selectLoggedIn ,
55
60
route : selectPageLocation ,
56
- metadata : getMetadata
61
+ metadata : getMetadata ,
62
+ isGFW : getIsGFW
57
63
} ) ;
Original file line number Diff line number Diff line change 8
8
line-height : 1.5 ;
9
9
font-size : rem (18px );
10
10
color : $slate ;
11
- background : $white ;
11
+ background : transparent ;
12
12
-webkit-font-smoothing : antialiased ;
13
13
-moz-osx-font-smoothing : grayscale ;
14
14
}
You can’t perform that action at this time.
0 commit comments