From a906263f74627dd928c581f388cf12faa3b43476 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 16 Feb 2023 03:23:42 +0100 Subject: use node16 module resolution --- packages/demobank-ui/src/hooks/access.ts | 10 +++++----- packages/demobank-ui/src/hooks/circuit.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'packages/demobank-ui/src/hooks') diff --git a/packages/demobank-ui/src/hooks/access.ts b/packages/demobank-ui/src/hooks/access.ts index 9c162acfe..9314af557 100644 --- a/packages/demobank-ui/src/hooks/access.ts +++ b/packages/demobank-ui/src/hooks/access.ts @@ -162,7 +162,7 @@ export function useAccountDetails( > { const { fetcher } = useAuthenticatedBackend(); - const { data, error } = useSWR< + const { data, error } = useSWR.default< HttpResponseOk, RequestError >([`access-api/accounts/${account}`], fetcher, { @@ -192,7 +192,7 @@ export function useWithdrawalDetails( > { const { fetcher } = useAuthenticatedBackend(); - const { data, error } = useSWR< + const { data, error } = useSWR.default< HttpResponseOk, RequestError >([`access-api/accounts/${account}/withdrawals/${wid}`], fetcher, { @@ -222,7 +222,7 @@ export function useTransactionDetails( > { const { fetcher } = useAuthenticatedBackend(); - const { data, error } = useSWR< + const { data, error } = useSWR.default< HttpResponseOk, RequestError >([`access-api/accounts/${account}/transactions/${tid}`], fetcher, { @@ -261,7 +261,7 @@ export function usePublicAccounts( data: afterData, error: afterError, isValidating: loadingAfter, - } = useSWR< + } = useSWR.default< HttpResponseOk, RequestError >([`public-accounts`, args?.page, PAGE_SIZE], paginatedFetcher); @@ -329,7 +329,7 @@ export function useTransactions( data: afterData, error: afterError, isValidating: loadingAfter, - } = useSWR< + } = useSWR.default< HttpResponseOk, RequestError >( diff --git a/packages/demobank-ui/src/hooks/circuit.ts b/packages/demobank-ui/src/hooks/circuit.ts index 91922a6ba..19a48224f 100644 --- a/packages/demobank-ui/src/hooks/circuit.ts +++ b/packages/demobank-ui/src/hooks/circuit.ts @@ -194,7 +194,7 @@ export function useBusinessAccountDetails( > { const { fetcher } = useAuthenticatedBackend(); - const { data, error } = useSWR< + const { data, error } = useSWR.default< HttpResponseOk, RequestError >([`circuit-api/accounts/${account}`], fetcher, { @@ -232,7 +232,7 @@ export function useBusinessAccounts( data: afterData, error: afterError, // isValidating: loadingAfter, - } = useSWR< + } = useSWR.default< HttpResponseOk, RequestError >( @@ -302,7 +302,7 @@ export function useCashouts(): HttpResponse< > { const { fetcher, multiFetcher } = useAuthenticatedBackend(); - const { data: list, error: listError } = useSWR< + const { data: list, error: listError } = useSWR.default< HttpResponseOk, RequestError >([`circuit-api/cashouts`], fetcher, { @@ -316,7 +316,7 @@ export function useCashouts(): HttpResponse< const paths = (list?.data.cashouts || []).map( (cashoutId) => `circuit-api/cashouts/${cashoutId}`, ); - const { data: cashouts, error: productError } = useSWR< + const { data: cashouts, error: productError } = useSWR.default< HttpResponseOk[], RequestError >([paths], multiFetcher, { -- cgit v1.2.3