fix: replace invalid TanStack Router search casts with typed defaults
Some checks failed
Build & Release / build (push) Failing after 32s

Newer TanStack Router enforces strict types on search params — 'search: {} as Record<string, unknown>' no longer satisfies routes with validateSearch. Replace all occurrences with the correct search shape for each destination route (pagination defaults for list routes, tab/field defaults for detail routes).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ryan Moon
2026-04-05 10:33:36 -05:00
parent b8e39369f1
commit a84530e80e
29 changed files with 68 additions and 68 deletions

View File

@@ -41,7 +41,7 @@ function AccountEnrollmentsTab() {
<div className="flex items-center justify-between">
<p className="text-sm text-muted-foreground">{data?.pagination.total ?? 0} enrollment(s)</p>
{hasPermission('lessons.edit') && (
<Button size="sm" onClick={() => navigate({ to: '/lessons/enrollments/new', search: {} as Record<string, unknown> })}>
<Button size="sm" onClick={() => navigate({ to: '/lessons/enrollments/new', search: { page: 1, limit: 25, q: undefined, sort: undefined, order: 'asc' as const } })}>
<Plus className="h-4 w-4 mr-1" />Enroll a Member
</Button>
)}
@@ -55,7 +55,7 @@ function AccountEnrollmentsTab() {
total={data?.data?.length ?? 0}
onPageChange={() => {}}
onSort={() => {}}
onRowClick={(e) => navigate({ to: '/lessons/enrollments/$enrollmentId', params: { enrollmentId: e.id }, search: {} as Record<string, unknown> })}
onRowClick={(e) => navigate({ to: '/lessons/enrollments/$enrollmentId', params: { enrollmentId: e.id }, search: { page: 1, limit: 25, q: undefined, sort: undefined, order: 'asc' as const } })}
/>
</div>
)