@@ -7,36 +7,38 @@ const dataSource = {
77 cluster : true ,
88 data : {
99 type : 'FeatureCollection' ,
10- features : conferences . map ( ( conference , i ) => {
11- const props = {
12- id : slugify ( `conference-${ conference . name } ` ) . toLowerCase ( ) ,
13- icon : conference . icon ,
14- url : conference . url ,
15- name : conference . name ,
16- coc : conference [ 'code-of-conduct' ] ,
17- covid19 : conference [ 'covid19-policy' ] ,
18- } ;
10+ features : conferences
11+ . filter ( conference => conference . location !== 'virtual' )
12+ . map ( ( conference , i ) => {
13+ const props = {
14+ id : slugify ( `conference-${ conference . name } ` ) . toLowerCase ( ) ,
15+ icon : conference . icon ,
16+ url : conference . url ,
17+ name : conference . name ,
18+ coc : conference [ 'code-of-conduct' ] ,
19+ health : conference [ 'health-policy' ] ,
20+ } ;
1921
20- if ( conference [ 'next-date' ] ) {
21- props . start = conference [ 'next-date' ] . start ;
22- props . end = conference [ 'next-date' ] . end ;
23- props . singleDay = conference [ 'next-date' ] . start === conference [ 'next-date' ] . end ;
22+ if ( conference [ 'next-date' ] ) {
23+ props . start = conference [ 'next-date' ] . start ;
24+ props . end = conference [ 'next-date' ] . end ;
25+ props . singleDay = conference [ 'next-date' ] . start === conference [ 'next-date' ] . end ;
2426
25- const parsedStart = LocalDate . parse ( props . start ) ;
26- const parsedEnd = LocalDate . parse ( props . end ) ;
27- props . isUpcoming = parsedStart . isAfter ( LocalDate . now ( ) ) ;
28- props . daysUntil = LocalDate . now ( ) . until ( parsedStart , ChronoUnit . DAYS ) ;
29- }
27+ const parsedStart = LocalDate . parse ( props . start ) ;
28+ const parsedEnd = LocalDate . parse ( props . end ) ;
29+ props . isUpcoming = parsedStart . isAfter ( LocalDate . now ( ) ) ;
30+ props . daysUntil = LocalDate . now ( ) . until ( parsedStart , ChronoUnit . DAYS ) ;
31+ }
3032
31- return {
32- type : 'Feature' ,
33- geometry : {
34- type : 'Point' ,
35- coordinates : [ conference . location . coordinates . lng , conference . location . coordinates . lat ] ,
36- } ,
37- properties : props ,
38- } ;
39- } ) ,
33+ return {
34+ type : 'Feature' ,
35+ geometry : {
36+ type : 'Point' ,
37+ coordinates : [ conference . location . coordinates . lng , conference . location . coordinates . lat ] ,
38+ } ,
39+ properties : props ,
40+ } ;
41+ } ) ,
4042 } ,
4143} ;
4244
0 commit comments