diff --git a/examples/react/kitchen-sink-single-file/src/main.tsx b/examples/react/kitchen-sink-single-file/src/main.tsx index 6b5d38e9e7..a521e86eb9 100644 --- a/examples/react/kitchen-sink-single-file/src/main.tsx +++ b/examples/react/kitchen-sink-single-file/src/main.tsx @@ -349,10 +349,13 @@ const invoiceRoute = invoicesRoute.createRoute({ invoiceId: z.number().int().parse(Number(params.invoiceId)), }), stringifyParams: ({ invoiceId }) => ({ invoiceId: `${invoiceId}` }), - validateSearch: z.object({ - showNotes: z.boolean().optional(), - notes: z.string().optional(), - }), + validateSearch: (search) => + z + .object({ + showNotes: z.boolean().optional(), + notes: z.string().optional(), + }) + .parse(search), loader: async ({ params: { invoiceId }, search: {} }) => { console.log('Fetching invoice...') const invoice = await fetchInvoiceById(invoiceId) @@ -564,7 +567,6 @@ const usersRoute = dashboardRoute.createRoute({ return (