()
| 13 | export const DEPLOY_URL = `http://localhost:${PORT}` |
| 14 | |
| 15 | export const usersQueryOptions = () => |
| 16 | queryOptions({ |
| 17 | queryKey: ['users'], |
| 18 | queryFn: () => |
| 19 | axios |
| 20 | .get<Array<User>>(DEPLOY_URL + '/api/users') |
| 21 | .then((r) => r.data) |
| 22 | .catch(() => { |
| 23 | throw new Error('Failed to fetch users') |
| 24 | }), |
| 25 | }) |
| 26 | |
| 27 | export const userQueryOptions = (id: string) => |
| 28 | queryOptions({ |
no test coverage detected