Fix dashboard not working for 7 days
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -36,3 +36,4 @@ yarn-error.log*
|
||||
# Misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
prod_db.tar
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user