Fix bug when converting date timestamp to date object. Updated the createdAt type.

This commit is contained in:
2025-12-04 12:29:00 -05:00
parent 9b6be363a0
commit d4040322a5
3 changed files with 4 additions and 5 deletions

View File

@@ -8,10 +8,8 @@ const lineChartArr = (dailyStatsArr: DailyStats): LineChartArr => {
dailyStatsArr.forEach((item) => {
const { linksDeleted, commandResponses, timesTriggered, createdAt } =
item;
const day =
typeof createdAt === "number"
? new Date(createdAt * 1000).getDate()
: new Date().getDate();
const day = new Date(Number(createdAt)).getDate();
const lineChartItem: LineChartItem = {
day,