fix recording calendar level out of range (#121)

This commit is contained in:
an-lee
2024-01-15 22:48:30 +08:00
committed by GitHub
parent 77b227183e
commit 3f2b6e78e8
2 changed files with 2 additions and 1 deletions

View File

@@ -101,7 +101,7 @@ export const RecordingCalendar = (props: {
_stats.forEach((a) => {
if (a.count === 0) {
a.level = 0;
} else if (a.count > 40) {
} else if (a.count >= 40) {
a.level = 4;
} else {
a.level = Math.floor(a.count / 10) + 1;

View File

@@ -5,4 +5,5 @@ type UserType = {
accessToken?: string;
recordingsCount?: number;
recordingsDuration?: number;
createdAt?: string;
};