diff options
Diffstat (limited to 'packages/demobank-ui/src')
-rw-r--r-- | packages/demobank-ui/src/hooks/access.ts | 10 | ||||
-rw-r--r-- | packages/demobank-ui/src/hooks/circuit.ts | 8 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/Routing.tsx | 4 |
3 files changed, 11 insertions, 11 deletions
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<SandboxBackend.Access.BankAccountBalanceResponse>, RequestError<SandboxBackend.SandboxError> >([`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<SandboxBackend.Access.BankAccountGetWithdrawalResponse>, RequestError<SandboxBackend.SandboxError> >([`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<SandboxBackend.Access.BankAccountTransactionInfo>, RequestError<SandboxBackend.SandboxError> >([`access-api/accounts/${account}/transactions/${tid}`], fetcher, { @@ -261,7 +261,7 @@ export function usePublicAccounts( data: afterData, error: afterError, isValidating: loadingAfter, - } = useSWR< + } = useSWR.default< HttpResponseOk<SandboxBackend.Access.PublicAccountsResponse>, RequestError<SandboxBackend.SandboxError> >([`public-accounts`, args?.page, PAGE_SIZE], paginatedFetcher); @@ -329,7 +329,7 @@ export function useTransactions( data: afterData, error: afterError, isValidating: loadingAfter, - } = useSWR< + } = useSWR.default< HttpResponseOk<SandboxBackend.Access.BankAccountTransactionsResponse>, RequestError<SandboxBackend.SandboxError> >( 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<SandboxBackend.Circuit.CircuitAccountData>, RequestError<SandboxBackend.SandboxError> >([`circuit-api/accounts/${account}`], fetcher, { @@ -232,7 +232,7 @@ export function useBusinessAccounts( data: afterData, error: afterError, // isValidating: loadingAfter, - } = useSWR< + } = useSWR.default< HttpResponseOk<SandboxBackend.Circuit.CircuitAccounts>, RequestError<SandboxBackend.SandboxError> >( @@ -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<SandboxBackend.Circuit.Cashouts>, RequestError<SandboxBackend.SandboxError> >([`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<SandboxBackend.Circuit.CashoutStatusResponse>[], RequestError<SandboxBackend.SandboxError> >([paths], multiFetcher, { diff --git a/packages/demobank-ui/src/pages/Routing.tsx b/packages/demobank-ui/src/pages/Routing.tsx index cff561aac..55317f4ed 100644 --- a/packages/demobank-ui/src/pages/Routing.tsx +++ b/packages/demobank-ui/src/pages/Routing.tsx @@ -19,8 +19,8 @@ import { useTranslationContext, } from "@gnu-taler/web-util/lib/index.browser"; import { createHashHistory } from "history"; -import { h, VNode } from "preact"; -import Router, { route, Route } from "preact-router"; +import { h, VNode, } from "preact"; +import { Router, route, Route } from "preact-router"; import { useEffect } from "preact/hooks"; import { Loading } from "../components/Loading.js"; import { PageStateType, usePageContext } from "../context/pageState.js"; |