From ba8b40c9150586982e42e76d364d76202627bd6f Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 10 Feb 2023 09:51:37 -0300
Subject: business account

---
 packages/demobank-ui/src/pages/Routing.tsx | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

(limited to 'packages/demobank-ui/src/pages/Routing.tsx')

diff --git a/packages/demobank-ui/src/pages/Routing.tsx b/packages/demobank-ui/src/pages/Routing.tsx
index a88af9b0b..cff561aac 100644
--- a/packages/demobank-ui/src/pages/Routing.tsx
+++ b/packages/demobank-ui/src/pages/Routing.tsx
@@ -28,6 +28,7 @@ import { HomePage } from "./HomePage.js";
 import { BankFrame } from "./BankFrame.js";
 import { PublicHistoriesPage } from "./PublicHistoriesPage.js";
 import { RegistrationPage } from "./RegistrationPage.js";
+import { BusinessAccount } from "./BusinessAccount.js";
 
 function handleNotOkResult(
   safe: string,
@@ -96,7 +97,11 @@ export function Routing(): VNode {
       <Route
         path="/account"
         component={() => (
-          <BankFrame>
+          <BankFrame
+            goToBusinessAccount={() => {
+              route("/business");
+            }}
+          >
             <HomePage
               onRegister={() => {
                 route("/register");
@@ -105,6 +110,22 @@ export function Routing(): VNode {
           </BankFrame>
         )}
       />
+      <Route
+        path="/business"
+        component={() => (
+          <BankFrame>
+            <BusinessAccount
+              onClose={() => {
+                route("/account");
+              }}
+              onRegister={() => {
+                route("/register");
+              }}
+              onLoadNotOk={handleNotOkResult("/account", saveError, i18n)}
+            />
+          </BankFrame>
+        )}
+      />
       <Route default component={Redirect} to="/account" />
     </Router>
   );
-- 
cgit v1.2.3

