From bdcb3037de50f59249d57aff63ade3c7f0eacc89 Mon Sep 17 00:00:00 2001 From: Groom Book CTO Date: Tue, 17 Mar 2026 17:54:04 +0000 Subject: [PATCH] fix: remove unused import, fix useCallback deps - Remove unused `or` import from drizzle-orm in appointments route - Compute week end directly in loadAppointments callback to avoid exhaustive-deps lint warning (weekEnd derived from weekStart) Co-Authored-By: Paperclip --- apps/api/src/routes/appointments.ts | 2 +- apps/web/src/pages/Appointments.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/routes/appointments.ts b/apps/api/src/routes/appointments.ts index 06d048f..69c71f2 100644 --- a/apps/api/src/routes/appointments.ts +++ b/apps/api/src/routes/appointments.ts @@ -1,7 +1,7 @@ import { Hono } from "hono"; import { zValidator } from "@hono/zod-validator"; import { z } from "zod"; -import { and, eq, gte, lt, lte, ne, or } from "drizzle-orm"; +import { and, eq, gte, lt, lte, ne } from "drizzle-orm"; import { getDb, appointments } from "@groombook/db"; export const appointmentsRouter = new Hono(); diff --git a/apps/web/src/pages/Appointments.tsx b/apps/web/src/pages/Appointments.tsx index 2bd14ad..58c126c 100644 --- a/apps/web/src/pages/Appointments.tsx +++ b/apps/web/src/pages/Appointments.tsx @@ -91,7 +91,7 @@ export function AppointmentsPage() { const loadAppointments = useCallback(() => { const from = weekStart.toISOString(); - const to = addDays(weekEnd, 1).toISOString(); + const to = addDays(weekStart, 7).toISOString(); return fetch(`/api/appointments?from=${encodeURIComponent(from)}&to=${encodeURIComponent(to)}`) .then((r) => { if (!r.ok) throw new Error(`HTTP ${r.status}`);