Skip to content

Commit

Permalink
switch default year to total
Browse files Browse the repository at this point in the history
  • Loading branch information
Yer1k committed Jan 30, 2024
1 parent 84aef00 commit a2ff814
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/RunMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const RunMap = ({
if (ref !== null) {
const map = ref.getMap();
if (map && IS_CHINESE) {
map.addControl(new MapboxLanguage({defaultLanguage: 'zh-Hans'}));
map.addControl(new MapboxLanguage({defaultLanguage: 'EN'}));
}
// all style resources have been downloaded
// and the first visually complete rendering of the base style has occurred.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
const Index = () => {
const { siteTitle } = useSiteMetadata();
const { activities, thisYear } = useActivities();
const [year, setYear] = useState(thisYear);
const [year, setYear] = useState('Total');
const [runIndex, setRunIndex] = useState(-1);
const [runs, setActivity] = useState(
filterAndSortRuns(activities, year, filterYearRuns, sortDateFunc)
Expand Down
2 changes: 1 addition & 1 deletion src/static/site-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const data: ISiteMetadataResult = {
},
{
name: 'About',
url: 'https://yer1k.gitlab.io/website/',
url: 'https://yer1k.weebly.com/',
},
],
};
Expand Down
4 changes: 2 additions & 2 deletions src/utils/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const CHINESE_INFO_MESSAGE = (yearLength: number, year: string): string => {
return `我用 App 记录自己跑步 ${yearLength} 年了,下面列表展示的是${yearStr}的数据`;
};
const ENGLISH_INFO_MESSAGE = (yearLength: number, year: string): string =>
`Running Journey with ${yearLength} Years, the table shows year ${year} data.
\n One at a time. \n Time will tell.`;
`Running Journey with ${yearLength} Years. Please feel free to click each year
to view more detailed data. \n One at a time. \n Time will tell.`;

// not support English for now
const CHINESE_LOCATION_INFO_MESSAGE_FIRST =
Expand Down

0 comments on commit a2ff814

Please sign in to comment.