Skip to content

Commit 4f9d490

Browse files
committed
make post error component avialable
1 parent 1c0536e commit 4f9d490

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/solid/start-clerk-basic/src/routes/_authed/posts.$postId.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import type { ErrorComponentProps } from '@tanstack/solid-router'
33
import { NotFound } from '~/components/NotFound.js'
44
import { fetchPost } from '~/utils/posts.js'
55

6+
export function PostErrorComponent({ error }: ErrorComponentProps) {
7+
return <ErrorComponent error={error} />
8+
}
9+
610
export const Route = createFileRoute('/_authed/posts/$postId')({
711
loader: ({ params: { postId } }) => fetchPost({ data: postId }),
812
errorComponent: PostErrorComponent,
@@ -12,9 +16,7 @@ export const Route = createFileRoute('/_authed/posts/$postId')({
1216
},
1317
})
1418

15-
export function PostErrorComponent({ error }: ErrorComponentProps) {
16-
return <ErrorComponent error={error} />
17-
}
19+
1820

1921
function PostComponent() {
2022
const post = Route.useLoaderData()

0 commit comments

Comments
 (0)