From d570dcd7fd4bd48ff5f8f841d862b561f8a019aa Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Mon, 19 Dec 2022 09:53:25 -0700 Subject: [PATCH] Update main.tsx --- examples/react/kitchen-sink-single-file/src/main.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 (