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 <noreply@paperclip.ing>
This commit is contained in:
Groom Book CTO
2026-03-17 17:54:04 +00:00
parent eb56157d7d
commit bdcb3037de
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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}`);