Fix dashboard not working for 7 days

This commit is contained in:
KMKoushik committed 2024-05-03 19:41:15 +10:00
1 parent 4e671556cc
commit f8312fe63d
2 files changed
+5 -1

No files matched your search

+1
View File
@@ -36,3 +36,4 @@ yarn-error.log*
# Misc
.DS_Store
*.pem
prod_db.tar
+4 -1
View File
@@ -125,7 +125,6 @@ export const emailRouter = createTRPCRouter({
(acc, { latestStatus, createdAt }) => {
const day = format(createdAt, "MMM dd");
console.log(day);
if (
!day ||
![
@@ -139,6 +138,10 @@ export const emailRouter = createTRPCRouter({
return acc;
}
if (!acc[day]) {
return acc;
}
acc[day]![
latestStatus as
| "DELIVERED"