MCPcopy Create free account
hub / github.com/TanStack/router / UsersComponent

Function UsersComponent

e2e/solid-start/basic-solid-query/src/routes/users.tsx:14–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12})
13
14function 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}

Callers

nothing calls this directly

Calls 1

usersQueryOptionsFunction · 0.90

Tested by

no test coverage detected