File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { useQuery } from '@tanstack/react-query' ;
2
2
3
- import { fetchLocalJSONAPI , fetchExternalJSONAPI } from '../network/genericJSONRequest' ;
3
+ import { fetchExternalJSONAPI } from '../network/genericJSONRequest' ;
4
4
import api from './apiClient' ;
5
5
import { OHSOME_STATS_BASE_URL } from '../config' ;
6
6
7
7
const ohsomeProxyAPI = ( url ) => {
8
8
const token = localStorage . getItem ( 'token' ) ;
9
- return fetchLocalJSONAPI ( `users/statistics/ohsome/?url=${ url } ` , token ) ;
9
+ return api ( token ) . get ( `users/statistics/ohsome/?url=${ url } ` ) ;
10
10
} ;
11
11
12
12
export const useSystemStatisticsQuery = ( ) => {
@@ -78,8 +78,9 @@ export const useUserOsmStatsQuery = (id) => {
78
78
return useQuery ( {
79
79
queryKey : [ 'user-osm-stats' ] ,
80
80
queryFn : fetchUserOsmStats ,
81
- useErrorBoundary : true ,
82
- select : ( data ) => data . result ,
81
+ // userDetail.test.js fails on CI when useErrorBoundary=true
82
+ useErrorBoundary : process . env . NODE_ENV !== 'test' ,
83
+ select : ( data ) => data . data . result ,
83
84
enabled : ! ! id ,
84
85
} ) ;
85
86
} ;
You can’t perform that action at this time.
0 commit comments