File tree Expand file tree Collapse file tree 3 files changed +7
-16
lines changed
Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 11import { getResource } from '@/api'
2- import { useQuery , UndefinedInitialDataOptions } from '@tanstack/react-query'
2+ import { useQuery , UseQueryOptions } from '@tanstack/react-query'
33import { TDataProvider } from '@/types'
44import { TPostArgs } from '@/types/wpRestApi'
55import { AxiosRequestConfig , AxiosResponse } from 'axios'
@@ -12,7 +12,10 @@ export function useOne<Response = unknown, Config = unknown>(options: {
1212 [ key : string ] : any
1313 }
1414 config ?: AxiosRequestConfig < { [ key : string ] : any } > | undefined
15- queryOptions ?: UndefinedInitialDataOptions < AxiosResponse < Response , Config > >
15+ queryOptions : Omit <
16+ UseQueryOptions < AxiosResponse < Response , Config > > ,
17+ 'queryKey'
18+ >
1619} ) {
1720 const resource = options ?. resource || 'post'
1821 const dataProvider = options ?. dataProvider || 'wp-rest'
Original file line number Diff line number Diff line change 2525 " lint:fix"
2626 ],
2727 "dependencies" : {
28- "@tanstack/react-query" : " ^5.28.9 " ,
28+ "@tanstack/react-query" : " 4.36.1 " ,
2929 "antd-toolkit" : " ^0.1.23" ,
3030 "axios" : " ^1.6.8" ,
3131 "react" : " ^18.2.0" ,
Original file line number Diff line number Diff line change 33693369 resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.36.1.tgz#79f8c1a539d47c83104210be2388813a7af2e524"
33703370 integrity sha512-DJSilV5+ytBP1FbFcEJovv4rnnm/CokuVvrBEtW/Va9DvuJ3HksbXUJEpI0aV1KtuL4ZoO9AVE6PyNLzF7tLeA==
33713371
3372- "@tanstack/query-core@5.28.9":
3373- version "5.28.9"
3374- resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.28.9.tgz#170a7a8794ab73aeffbaf711ac62126479a5d026"
3375- integrity sha512-hNlfCiqZevr3GRVPXS3MhaGW5hjcxvCsIQ4q6ff7EPlvFwYZaS+0d9EIIgofnegDaU2BbCDlyURoYfRl5rmzow==
3376-
33773372"@tanstack/query-devtools@5.28.10":
33783373 version "5.28.10"
33793374 resolved "https://registry.yarnpkg.com/@tanstack/query-devtools/-/query-devtools-5.28.10.tgz#33e9a42dd2199fca12f0dd2d891570ecdbfd3c7b"
33863381 dependencies:
33873382 "@tanstack/query-devtools" "5.28.10"
33883383
3389- "@tanstack/react-query@^4.10.1":
3384+ "@tanstack/react-query@4.36.1", "@tanstack/react-query@ ^4.10.1":
33903385 version "4.36.1"
33913386 resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.36.1.tgz#acb589fab4085060e2e78013164868c9c785e5d2"
33923387 integrity sha512-y7ySVHFyyQblPl3J3eQBWpXZkliroki3ARnBKsdJchlgt7yJLRDUcf4B8soufgiYt3pEQIkBWBx1N9/ZPIeUWw==
33933388 dependencies:
33943389 "@tanstack/query-core" "4.36.1"
33953390 use-sync-external-store "^1.2.0"
33963391
3397- "@tanstack/react-query@^5.28.9":
3398- version "5.28.9"
3399- resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.28.9.tgz#13c2049daa5db6c3137473e279b209f76d39708e"
3400- integrity sha512-vwifBkGXsydsLxFOBMe3+f8kvtDoqDRDwUNjPHVDDt+FoBetCbOWAUHgZn4k+CVeZgLmy7bx6aKeDbe3e8koOQ==
3401- dependencies:
3402- "@tanstack/query-core" "5.28.9"
3403-
34043392"@tootallnate/quickjs-emscripten@^0.23.0":
34053393 version "0.23.0"
34063394 resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c"
You can’t perform that action at this time.
0 commit comments