File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
src/shared/components/Contentful Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -158,13 +158,24 @@ export class SearchBarInner extends Component {
158
158
{
159
159
_ . map ( suggestionList . Article , item => (
160
160
< div
161
+ role = "button"
162
+ tabIndex = "0"
161
163
key = { `${ item . title } -${ item . content } -${ item . featuredImage } ` }
162
164
className = { theme [ 'group-cell' ] }
165
+ onClick = { ( ) => {
166
+ window . location . href = ( item . externalArticle && item . contentUrl )
167
+ ? item . contentUrl : `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_ARTICLES_PATH } /${ item . title } ` ;
168
+ } }
169
+ onKeyPress = { _ . noop }
163
170
>
164
171
< a
165
172
className = { theme . articleLink }
166
173
href = { ( item . externalArticle && item . contentUrl ) ? item . contentUrl : `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_ARTICLES_PATH } /${ item . title } ` }
167
174
target = { ( item . externalArticle && item . contentUrl ) ? '_blank' : '_self' }
175
+ onClick = { ( e ) => {
176
+ e . nativeEvent . stopImmediatePropagation ( ) ;
177
+ e . stopPropagation ( ) ;
178
+ } }
168
179
>
169
180
{
170
181
item . featuredImage ? (
@@ -199,12 +210,23 @@ export class SearchBarInner extends Component {
199
210
_ . map ( suggestionList . Video , item => (
200
211
< div
201
212
key = { `${ item . title } -${ item . content } -${ item . featuredImage } ` }
213
+ role = "button"
214
+ tabIndex = "-11"
202
215
className = { theme [ 'group-cell' ] }
216
+ onClick = { ( ) => {
217
+ window . location . href = ( item . externalArticle && item . contentUrl )
218
+ ? item . contentUrl : `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_ARTICLES_PATH } /${ item . title } ` ;
219
+ } }
220
+ onKeyPress = { _ . noop }
203
221
>
204
222
< a
205
223
className = { theme . articleLink }
206
224
href = { ( item . externalArticle && item . contentUrl ) ? item . contentUrl : `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_ARTICLES_PATH } /${ item . title } ` }
207
225
target = { ( item . externalArticle && item . contentUrl ) ? '_blank' : '_self' }
226
+ onClick = { ( e ) => {
227
+ e . nativeEvent . stopImmediatePropagation ( ) ;
228
+ e . stopPropagation ( ) ;
229
+ } }
208
230
>
209
231
{
210
232
item . featuredImage ? (
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ SearchPageFilterInner.defaultProps = {
201
201
onApply : ( ) => { } ,
202
202
selectedAuthor : DEF_SELECTED_AUTHOR ,
203
203
authorList : [ DEF_SELECTED_AUTHOR ] ,
204
- startDate : moment ( ) . subtract ( 1 , 'months ') ,
204
+ startDate : moment ( '2001-01-02 ') ,
205
205
endDate : moment ( ) ,
206
206
tags : [ ] ,
207
207
selectedCategory : '' ,
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ TracksFilterInner.defaultProps = {
153
153
onApply : ( ) => { } ,
154
154
selectedAuthor : DEF_SELECTED_AUTHOR ,
155
155
authorList : [ DEF_SELECTED_AUTHOR ] ,
156
- startDate : moment ( ) . subtract ( 1 , 'months ') ,
156
+ startDate : moment ( '2001-01-02 ') ,
157
157
endDate : moment ( ) ,
158
158
tags : [ ] ,
159
159
} ;
You can’t perform that action at this time.
0 commit comments