(id: string)
| 26 | }) |
| 27 | |
| 28 | export const userQueryOptions = (id: string) => |
| 29 | queryOptions({ |
| 30 | queryKey: ['users', id], |
| 31 | queryFn: () => |
| 32 | axios |
| 33 | .get<User>(getOrigin() + '/api/users/' + id) |
| 34 | .then((r) => r.data) |
| 35 | .catch(() => { |
| 36 | throw new Error('Failed to fetch user') |
| 37 | }), |
| 38 | }) |
no test coverage detected