File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -19,29 +19,32 @@ const makeRed = <T extends Geometry, P extends GeoJsonProperties>(
1919 f : Feature < T , P >
2020) => ( {
2121 ...f ,
22- properties : { ...f . properties , title : 'Target' , 'marker-color' : '#f00 ' } ,
22+ properties : { ...f . properties , title : 'Target' , 'marker-color' : '#ff0000 ' } ,
2323} ) ;
2424
25+ const medalColors = [ '#d4af37' , '#c0c0c0' , '#cd7f32' ] ;
26+
27+ const color = ( i : number ) => medalColors [ i ] ?? '#444444' ;
28+
2529const makePlacements = < P extends GeoJsonProperties > (
2630 f : Feature < Point , P > ,
2731 i : number
2832) : Feature < Point , P > => {
29- if ( i >= 9 ) {
30- return f ;
31- } else {
32- return {
33- ... f ,
34- properties : { ... f . properties , 'marker-symbol ' : i + 1 } ,
35- } ;
36- }
33+ return {
34+ ... f ,
35+ properties : {
36+ ... f . properties ,
37+ 'marker-symbol' : i < 9 ? i + 1 : undefined ,
38+ 'marker-color ' : color ( i ) ,
39+ } ,
40+ } ;
3741} ;
3842
3943const MapLink : FunctionComponent < Props > = ( { results } ) => {
4044 const gameConfig = useAppSelector ( selectGameConfig ) ;
4145 const target = gameConfig ?. target ;
4246
4347 const onClick = useCallback ( ( ) => {
44- const a = document . createElement ( 'a' ) ;
4548 let targets : Feature [ ] ;
4649 if ( ! target ) {
4750 targets = [ ] ;
You can’t perform that action at this time.
0 commit comments