diff options
Diffstat (limited to 'packages/demobank-ui/src')
-rw-r--r-- | packages/demobank-ui/src/hooks/access.ts | 2 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/PublicHistoriesPage.tsx | 10 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/Routing.tsx | 8 |
3 files changed, 5 insertions, 15 deletions
diff --git a/packages/demobank-ui/src/hooks/access.ts b/packages/demobank-ui/src/hooks/access.ts index 5eddec033..96661ed95 100644 --- a/packages/demobank-ui/src/hooks/access.ts +++ b/packages/demobank-ui/src/hooks/access.ts @@ -294,7 +294,7 @@ export function usePublicAccounts( } = useSWR< HttpResponseOk<SandboxBackend.Access.PublicAccountsResponse>, RequestError<SandboxBackend.SandboxError> - >([`public-accounts`, args?.page, PAGE_SIZE], paginatedFetcher); + >([`access-api/public-accounts`, args?.page, PAGE_SIZE], paginatedFetcher); const [lastAfter, setLastAfter] = useState< HttpResponse< diff --git a/packages/demobank-ui/src/pages/PublicHistoriesPage.tsx b/packages/demobank-ui/src/pages/PublicHistoriesPage.tsx index 256653dc5..796935373 100644 --- a/packages/demobank-ui/src/pages/PublicHistoriesPage.tsx +++ b/packages/demobank-ui/src/pages/PublicHistoriesPage.tsx @@ -21,17 +21,16 @@ import { useState } from "preact/hooks"; import { Transactions } from "../components/Transactions/index.js"; import { usePublicAccounts } from "../hooks/access.js"; import { handleNotOkResult } from "./HomePage.js"; +import { Loading } from "../components/Loading.js"; const logger = new Logger("PublicHistoriesPage"); -interface Props { - onLoadNotOk: () => void; -} +interface Props {} /** * Show histories of public accounts. */ -export function PublicHistoriesPage({ onLoadNotOk }: Props): VNode { +export function PublicHistoriesPage({}: Props): VNode { const { i18n } = useTranslationContext(); const result = usePublicAccounts(); @@ -43,7 +42,6 @@ export function PublicHistoriesPage({ onLoadNotOk }: Props): VNode { ); if (!result.ok) { - onLoadNotOk(); return handleNotOkResult(i18n)(result); } @@ -52,8 +50,6 @@ export function PublicHistoriesPage({ onLoadNotOk }: Props): VNode { const txs: Record<string, h.JSX.Element> = {}; const accountsBar = []; - logger.trace(`Public history tab: ${showAccount}`); - // Ask story of all the public accounts. for (const account of data.publicAccounts) { logger.trace("Asking transactions for", account.accountLabel); diff --git a/packages/demobank-ui/src/pages/Routing.tsx b/packages/demobank-ui/src/pages/Routing.tsx index 27aae69e9..d3aaae542 100644 --- a/packages/demobank-ui/src/pages/Routing.tsx +++ b/packages/demobank-ui/src/pages/Routing.tsx @@ -51,13 +51,7 @@ export function Routing(): VNode { /> <Route path="/public-accounts" - component={() => ( - <PublicHistoriesPage - onLoadNotOk={() => { - route("/account"); - }} - /> - )} + component={() => <PublicHistoriesPage />} /> <Route path="/register" |