From 4ee903eb5e639fa0e122a689cc431e8f18ca1197 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 6 Nov 2023 11:54:45 -0300
Subject: aml ui

---
 packages/aml-backoffice-ui/src/App.tsx | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

(limited to 'packages/aml-backoffice-ui/src/App.tsx')

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>
-- 
cgit v1.2.3

