File tree Expand file tree Collapse file tree 10 files changed +274
-110
lines changed Expand file tree Collapse file tree 10 files changed +274
-110
lines changed Original file line number Diff line number Diff line change 4
4
"version" : " 1.1.0" ,
5
5
"license" : " MIT" ,
6
6
"peerDependencies" : {
7
- "react" : " ^18.2.0" ,
7
+ "react" : " ^18.2.0"
8
+ },
9
+ "dependencies" : {
10
+ "@siafoundation/next" : " ^0.1.3" ,
11
+ "@siafoundation/request" : " 0.0.0" ,
8
12
"swr" : " ^2.1.1" ,
9
13
"axios" : " ^0.27.2" ,
10
14
"use-local-storage-state" : " ^18.3.3" ,
11
- "@siafoundation/next" : " ^0.1.3" ,
12
- "@siafoundation/request" : " 0.0.0"
13
- },
14
- "dependencies" : {
15
15
"detect-gpu" : " ^5.0.34"
16
16
},
17
17
"types" : " ./src/index.d.ts"
Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ import {
8
8
buildRouteWithParams ,
9
9
InternalCallbackArgs ,
10
10
mergeInternalCallbackArgs ,
11
- RequestParams ,
12
11
Response ,
13
12
InternalHookArgsCallback ,
14
13
mergeInternalHookArgsCallback ,
15
14
After ,
16
15
getPathFromKey ,
17
16
} from './request'
18
17
import { useAppSettings } from './useAppSettings'
18
+ import { RequestParams } from '@siafoundation/request'
19
19
20
20
type DeleteFunc < Params extends RequestParams , Result > = {
21
21
delete : (
Original file line number Diff line number Diff line change 8
8
buildRouteWithParams ,
9
9
InternalCallbackArgs ,
10
10
mergeInternalCallbackArgs ,
11
- RequestParams ,
12
11
Response ,
13
12
mergeInternalHookArgsCallback ,
14
13
InternalHookArgsSwr ,
@@ -18,6 +17,7 @@ import {
18
17
import { SWRError } from './types'
19
18
import { useAppSettings } from './useAppSettings'
20
19
import { keyOrNull } from './utils'
20
+ import { RequestParams } from '@siafoundation/request'
21
21
22
22
export function useGetSwr < Params extends RequestParams , Result > (
23
23
args : InternalHookArgsSwr < Params , Result >
Original file line number Diff line number Diff line change 9
9
InternalCallbackArgs ,
10
10
InternalHookArgsCallback ,
11
11
mergeInternalCallbackArgs ,
12
- RequestParams ,
13
12
Response ,
14
13
mergeInternalHookArgsCallback ,
15
14
getPathFromKey ,
@@ -22,6 +21,7 @@ import { useAppSettings } from './useAppSettings'
22
21
import { useMemo } from 'react'
23
22
import { keyOrNull } from './utils'
24
23
import { SWRError } from './types'
24
+ import { RequestParams } from '@siafoundation/request'
25
25
26
26
export function usePatchSwr < Params extends RequestParams , Payload , Result > (
27
27
args : InternalHookArgsWithPayloadSwr < Params , Payload , Result >
Original file line number Diff line number Diff line change 8
8
buildRouteWithParams ,
9
9
InternalCallbackArgs ,
10
10
mergeInternalCallbackArgs ,
11
- RequestParams ,
12
11
Response ,
13
12
InternalHookArgsCallback ,
14
13
mergeInternalHookArgsCallback ,
@@ -22,6 +21,7 @@ import { SWRError } from './types'
22
21
import { useAppSettings } from './useAppSettings'
23
22
import { keyOrNull } from './utils'
24
23
import { useWorkflows } from './workflows'
24
+ import { RequestParams } from '@siafoundation/request'
25
25
26
26
export function usePostSwr < Params extends RequestParams , Payload , Result > (
27
27
args : InternalHookArgsWithPayloadSwr < Params , Payload , Result >
Original file line number Diff line number Diff line change 9
9
InternalCallbackArgs ,
10
10
InternalHookArgsCallback ,
11
11
mergeInternalCallbackArgs ,
12
- RequestParams ,
13
12
Response ,
14
13
mergeInternalHookArgsCallback ,
15
14
getPathFromKey ,
@@ -22,6 +21,7 @@ import { useAppSettings } from './useAppSettings'
22
21
import { useMemo } from 'react'
23
22
import { keyOrNull } from './utils'
24
23
import { SWRError } from './types'
24
+ import { RequestParams } from '@siafoundation/request'
25
25
26
26
export function usePutSwr < Params extends RequestParams , Payload , Result > (
27
27
args : InternalHookArgsWithPayloadSwr < Params , Payload , Result >
You can’t perform that action at this time.
0 commit comments