Skip to content

Commit

Permalink
update: sport type: trail_running
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-29 committed Oct 26, 2023
1 parent 451a9d6 commit c172610
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions run_page/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def safeget(dct, *keys):
"RUN": "Run",
"Run": "Run",
"track_running": "Run",
"trail_running": "Trail Running",
"trail_running": "Trail Run",
"cycling": "Ride",
"CYCLING": "Ride",
"Ride": "Ride",
Expand Down Expand Up @@ -83,7 +83,7 @@ def safeget(dct, *keys):
"VirtualRide",
"Rowing",
"Run",
"Trail Running",
"Trail Run",
"Swim",
"RoadTrip",
"Kayaking",
Expand Down
4 changes: 2 additions & 2 deletions src/utils/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const INFO_MESSAGE = IS_CHINESE ? CHINESE_INFO_MESSAGE : ENGLISH_INFO_MESSAGE;
const FULL_MARATHON_RUN_TITLE = IS_CHINESE ? '全程马拉松' : 'Full Marathon';
const HALF_MARATHON_RUN_TITLE = IS_CHINESE ? '半程马拉松' : 'Half Marathon';
const RUN_TITLE = IS_CHINESE ? '跑步' : 'Run';
const TRAIL_RUN_TITLE = IS_CHINESE ? '越野跑' : 'Trail Running';
const TRAIL_RUN_TITLE = IS_CHINESE ? '越野跑' : 'Trail Run';
const SWIM_TITLE = IS_CHINESE ? '游泳' : 'Swim';

const RIDE_TITLE = IS_CHINESE ? '骑行' : 'Ride';
Expand Down Expand Up @@ -128,4 +128,4 @@ export const PROVINCE_FILL_COLOR = '#47b8e0';
export const COUNTRY_FILL_COLOR = wpink;
export const KAYAKING_COLOR = red;
export const SNOWBOARD_COLOR = wpink;
export const TRAIL_RUNNING_COLOR = IKB;
export const TRAIL_RUN_COLOR = IKB;
8 changes: 4 additions & 4 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
RUN_COLOR,
KAYAKING_COLOR,
SNOWBOARD_COLOR,
TRAIL_RUNNING_COLOR,
TRAIL_RUN_COLOR,
} from './const';
import { FeatureCollection, LineString } from 'geojson';

Expand Down Expand Up @@ -196,7 +196,7 @@ const titleForType = (type: string): string => {
switch (type) {
case 'Run':
return RUN_TITLES.RUN_TITLE;
case 'Trail Running':
case 'Trail Run':
return RUN_TITLES.TRAIL_RUN_TITLE;
case 'Ride':
return RUN_TITLES.RIDE_TITLE;
Expand Down Expand Up @@ -243,8 +243,8 @@ const colorFromType = (workoutType: string): string => {
switch (workoutType) {
case 'Run':
return RUN_COLOR;
case 'Trail Running':
return TRAIL_RUNNING_COLOR;
case 'Trail Run':
return TRAIL_RUN_COLOR;
case 'Ride':
case 'Indoor Ride':
return RIDE_COLOR;
Expand Down

0 comments on commit c172610

Please sign in to comment.