Skip to content

Commit 5e36956

Browse files
committed
dont show new habits before created
1 parent cb791bf commit 5e36956

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apps/app/.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
# The following patterns were generated by expo-cli
44

55
expo-env.d.ts
6-
# @end expo-cli
6+
# @end expo-cli
7+
8+
dist/

packages/api/src/router/habit.ts

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const habitRouter = createTRPCRouter({
3434
select: { id: true, name: true, order: true, reminders: true, startDate: true, archivedAt: true },
3535
where: {
3636
OR: [{ archivedAt: { equals: null } }, { archivedAt: { gte: dayjs(date).endOf("day").toDate() } }],
37+
createdAt: { lte: dayjs(date).startOf("day").toDate() },
3738
creatorId: { equals: ctx.user.id },
3839
},
3940
}),

0 commit comments

Comments
 (0)