Skip to content

Commit

Permalink
Update main.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Dec 19, 2022
1 parent ccbd238 commit d570dcd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/react/kitchen-sink-single-file/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -564,7 +567,6 @@ const usersRoute = dashboardRoute.createRoute({
return (
<div key={user.id}>
<Link
to={userRoute.id}
params={{
userId: user.id,
}}
Expand Down

0 comments on commit d570dcd

Please sign in to comment.