aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/App.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-11-06 11:54:45 -0300
committerSebastian <sebasjm@gmail.com>2023-11-06 11:54:45 -0300
commit4ee903eb5e639fa0e122a689cc431e8f18ca1197 (patch)
treed2cf28bcddb03f650fe7913ff2db8e48145740c4 /packages/aml-backoffice-ui/src/App.tsx
parent3d1ab082d4a66df08fcb468d04198c055d00b8c5 (diff)
downloadwallet-core-4ee903eb5e639fa0e122a689cc431e8f18ca1197.tar.xz
aml ui
Diffstat (limited to 'packages/aml-backoffice-ui/src/App.tsx')
-rw-r--r--packages/aml-backoffice-ui/src/App.tsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/aml-backoffice-ui/src/App.tsx b/packages/aml-backoffice-ui/src/App.tsx
index 0e29279ff..52c86c273 100644
--- a/packages/aml-backoffice-ui/src/App.tsx
+++ b/packages/aml-backoffice-ui/src/App.tsx
@@ -1,9 +1,14 @@
import { TranslationProvider } from "@gnu-taler/web-util/browser";
import { h, VNode } from "preact";
-import { ExchangeAmlFrame, Main } from "./Dashboard.js";
+import { ExchangeAmlFrame } from "./Dashboard.js";
import "./scss/main.css";
import { ExchangeApiProvider } from "./context/config.js";
import { getInitialBackendBaseURL } from "./hooks/useBackend.js";
+import { Router } from "./route.js";
+import { Pages } from "./pages.js";
+
+const pageList = Object.values(Pages);
+
export function App(): VNode {
const baseUrl = getInitialBackendBaseURL();
@@ -11,7 +16,13 @@ export function App(): VNode {
<TranslationProvider source={{}}>
<ExchangeApiProvider baseUrl={baseUrl} frameOnError={ExchangeAmlFrame}>
<ExchangeAmlFrame>
- <Main />
+ <Router
+ pageList={pageList}
+ onNotFound={() => {
+ window.location.href = Pages.cases.url
+ return <div>not found</div>;
+ }}
+ />
</ExchangeAmlFrame>
</ExchangeApiProvider>
</TranslationProvider>