File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
examples/solid/start-clerk-basic/src/routes/_authed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ import type { ErrorComponentProps } from '@tanstack/solid-router'
33import { NotFound } from '~/components/NotFound.js'
44import { fetchPost } from '~/utils/posts.js'
55
6+ export function PostErrorComponent ( { error } : ErrorComponentProps ) {
7+ return < ErrorComponent error = { error } />
8+ }
9+
610export 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
1921function PostComponent ( ) {
2022 const post = Route . useLoaderData ( )
You can’t perform that action at this time.
0 commit comments