()
| 16 | }) |
| 17 | |
| 18 | function PostsComponent() { |
| 19 | const posts = Route.useLoaderData() |
| 20 | |
| 21 | return ( |
| 22 | <div class="p-2 flex gap-2"> |
| 23 | <ul class="list-disc pl-4"> |
| 24 | <For each={posts()}> |
| 25 | {(post) => { |
| 26 | return ( |
| 27 | <li class="whitespace-nowrap"> |
| 28 | <Link |
| 29 | to="/posts/$postId" |
| 30 | params={{ |
| 31 | postId: post.id, |
| 32 | }} |
| 33 | class="block py-1 text-blue-800 hover:text-blue-600" |
| 34 | activeProps={{ class: 'text-black font-bold' }} |
| 35 | > |
| 36 | <div>{post.title.substring(0, 20)}</div> |
| 37 | </Link> |
| 38 | </li> |
| 39 | ) |
| 40 | }} |
| 41 | </For> |
| 42 | </ul> |
| 43 | <hr /> |
| 44 | <Outlet /> |
| 45 | </div> |
| 46 | ) |
| 47 | } |
nothing calls this directly
no outgoing calls
no test coverage detected