From 5750af83d8eaa2cb45ab3b69e48c44f0f65d081e Mon Sep 17 00:00:00 2001 From: Ryan Moon Date: Sun, 5 Apr 2026 10:40:23 -0500 Subject: [PATCH] fix: suppress navigate search type error in usePagination; fix setBillingUnit cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - use-pagination.ts: ts-expect-error on navigate call — search type resolves as never without route context, safe with strict:false - $enrollmentId.tsx: wrap onValueChange to cast string to billingUnit union type Co-Authored-By: Claude Sonnet 4.6 --- packages/admin/src/hooks/use-pagination.ts | 1 + .../routes/_authenticated/lessons/enrollments/$enrollmentId.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/admin/src/hooks/use-pagination.ts b/packages/admin/src/hooks/use-pagination.ts index 490b257..bff883a 100644 --- a/packages/admin/src/hooks/use-pagination.ts +++ b/packages/admin/src/hooks/use-pagination.ts @@ -22,6 +22,7 @@ export function usePagination() { } function setParams(updates: Partial) { + // @ts-expect-error: navigate without a route context resolves search as never; safe here since we use strict:false navigate({ search: (prev: any) => ({ ...prev, diff --git a/packages/admin/src/routes/_authenticated/lessons/enrollments/$enrollmentId.tsx b/packages/admin/src/routes/_authenticated/lessons/enrollments/$enrollmentId.tsx index 7829e2d..f8747f6 100644 --- a/packages/admin/src/routes/_authenticated/lessons/enrollments/$enrollmentId.tsx +++ b/packages/admin/src/routes/_authenticated/lessons/enrollments/$enrollmentId.tsx @@ -265,7 +265,7 @@ function DetailsTab({ onChange={(e) => setBillingInterval(e.target.value)} className="w-20" /> - setBillingUnit(v as typeof billingUnit)}> {BILLING_UNITS.map((u) => (