()
| 12 | }) |
| 13 | |
| 14 | function UsersComponent() { |
| 15 | const usersQuery = useQuery(() => usersQueryOptions()) |
| 16 | |
| 17 | return ( |
| 18 | <div class="p-2 flex gap-2"> |
| 19 | <ul class="list-disc pl-4"> |
| 20 | <For |
| 21 | each={[ |
| 22 | ...(usersQuery.data ?? []), |
| 23 | { id: 'i-do-not-exist', name: 'Non-existent User', email: '' }, |
| 24 | ]} |
| 25 | > |
| 26 | {(user) => ( |
| 27 | <li class="whitespace-nowrap"> |
| 28 | <Link |
| 29 | to="/users/$userId" |
| 30 | params={{ |
| 31 | userId: String(user.id), |
| 32 | }} |
| 33 | class="block py-1 text-blue-800 hover:text-blue-600" |
| 34 | activeProps={{ class: 'text-black font-bold' }} |
| 35 | > |
| 36 | <div>{user.name}</div> |
| 37 | </Link> |
| 38 | </li> |
| 39 | )} |
| 40 | </For> |
| 41 | </ul> |
| 42 | <hr /> |
| 43 | <Outlet /> |
| 44 | </div> |
| 45 | ) |
| 46 | } |
nothing calls this directly
no test coverage detected