mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: implement translation for days (#784)
implement trranslation for weekdays Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b6fe4d914e
commit
6596e6893e
@ -1,5 +1,6 @@
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useLocationStore, useMemoStore, useUserStore } from "../store/module";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { getMemoStats } from "../helpers/api";
|
||||
import { DAILY_TIMESTAMP } from "../helpers/consts";
|
||||
import * as utils from "../helpers/utils";
|
||||
@ -27,6 +28,7 @@ interface DailyUsageStat {
|
||||
}
|
||||
|
||||
const UsageHeatMap = () => {
|
||||
const { t } = useTranslation();
|
||||
const locationStore = useLocationStore();
|
||||
const userStore = useUserStore();
|
||||
const memoStore = useMemoStore();
|
||||
@ -97,13 +99,13 @@ const UsageHeatMap = () => {
|
||||
return (
|
||||
<div className="usage-heat-map-wrapper" ref={containerElRef}>
|
||||
<div className="day-tip-text-container">
|
||||
<span className="tip-text">Sun</span>
|
||||
<span className="tip-text">{t("days.sun")}</span>
|
||||
<span className="tip-text"></span>
|
||||
<span className="tip-text">Tue</span>
|
||||
<span className="tip-text">{t("days.tue")}</span>
|
||||
<span className="tip-text"></span>
|
||||
<span className="tip-text">Thu</span>
|
||||
<span className="tip-text">{t("days.thu")}</span>
|
||||
<span className="tip-text"></span>
|
||||
<span className="tip-text">Sat</span>
|
||||
<span className="tip-text">{t("days.sat")}</span>
|
||||
</div>
|
||||
<div className="usage-heat-map">
|
||||
{allStat.map((v, i) => {
|
||||
|
Reference in New Issue
Block a user