@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
4
4
import Icon from 'components/ui/icon' ;
5
+ import ScrollTo from 'components/scroll-to' ;
5
6
6
7
import sgfLogo from './img/GFW_SGF_logo.png' ;
7
8
import techLogo from './img/GFW_TECH_logo.png' ;
@@ -12,12 +13,18 @@ class SectionAbout extends PureComponent {
12
13
// eslint-disable-line react/prefer-stateless-function
13
14
render ( ) {
14
15
const { results, sgfBenefits, fellowshipBenefits } = this . props ;
16
+ const anchorId = window . location . hash ;
17
+ const anchor =
18
+ anchorId && document . getElementById ( anchorId . replace ( '#' , '' ) ) ;
19
+
15
20
return (
16
21
< div className = "l-section-about" >
17
22
< section className = "intro" >
18
23
< div className = "row intro" >
19
24
< div className = "column small-12 medium-9" >
20
- < h2 className = "section-title" > Small Grants Fund</ h2 >
25
+ < h2 className = "section-title" id = "small-grants-fund" >
26
+ Small Grants Fund
27
+ </ h2 >
21
28
< p className = "text -paragraph -color-2 -light -spaced" >
22
29
Civil Society Organizations operating in and around forested
23
30
areas are some of the most effective champions of forest
@@ -84,7 +91,9 @@ class SectionAbout extends PureComponent {
84
91
< section className = "intro" >
85
92
< div className = "row intro" >
86
93
< div className = "column small-12 medium-9" >
87
- < h2 className = "section-title" > Tech Fellowship</ h2 >
94
+ < h2 className = "section-title" id = "tech-fellowship" >
95
+ Tech Fellowship
96
+ </ h2 >
88
97
< p className = "text -paragraph -color-2 -light -spaced" >
89
98
The Global Forest Watch Technology Fellowship aims to recruit
90
99
and train the best and brightest forest managers, protectors and
@@ -127,7 +136,7 @@ class SectionAbout extends PureComponent {
127
136
< section className = "support" >
128
137
< div className = "row" >
129
138
< div className = "column small-12 medium-9" >
130
- < h2 className = "section-title" >
139
+ < h2 className = "section-title" id = "support" >
131
140
Support the Small Grants Fund and Fellowship
132
141
</ h2 >
133
142
< p className = "text -paragraph -color-2 -light -spaced" >
@@ -144,6 +153,7 @@ class SectionAbout extends PureComponent {
144
153
</ div >
145
154
</ div >
146
155
</ section >
156
+ { anchor && < ScrollTo target = { anchor } /> }
147
157
</ div >
148
158
) ;
149
159
}
0 commit comments