File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export const ProxyProvider: FC<PropsWithChildren> = ({ children }) => {
118
118
} ) ;
119
119
120
120
const { permissions } = useAuthenticated ( ) ;
121
- const query = async ( ) : Promise < readonly Region [ ] > => {
121
+ const queryFn = async ( ) : Promise < readonly Region [ ] > => {
122
122
const endpoint = permissions . editWorkspaceProxies
123
123
? getWorkspaceProxies
124
124
: getWorkspaceProxyRegions ;
@@ -131,13 +131,7 @@ export const ProxyProvider: FC<PropsWithChildren> = ({ children }) => {
131
131
error : proxiesError ,
132
132
isLoading : proxiesLoading ,
133
133
isFetched : proxiesFetched ,
134
- } = useQuery (
135
- cachedQuery ( {
136
- initialData,
137
- queryKey,
138
- queryFn : query ,
139
- } ) ,
140
- ) ;
134
+ } = useQuery ( cachedQuery ( { initialData, queryKey, queryFn } ) ) ;
141
135
142
136
// Every time we get a new proxiesResponse, update the latency check
143
137
// to each workspace proxy.
You can’t perform that action at this time.
0 commit comments