chore: update memo display time (#327)

* chore: update memo display time

* chore: update
This commit is contained in:
boojack
2022-10-21 20:26:00 +08:00
committed by GitHub
parent b68d6e2693
commit 2a4fc7dcc3
17 changed files with 59 additions and 73 deletions

View File

@ -41,7 +41,7 @@ const UsageHeatMap = () => {
useEffect(() => {
const newStat: DailyUsageStat[] = getInitialUsageStat(usedDaysAmount, beginDayTimestemp);
for (const m of memos) {
const index = (utils.getDateStampByDate(m.createdTs) - beginDayTimestemp) / (1000 * 3600 * 24) - 1;
const index = (utils.getDateStampByDate(m.displayTs) - beginDayTimestemp) / (1000 * 3600 * 24) - 1;
if (index >= 0) {
newStat[index].count += 1;
}