diff options
author | Sebastian <sebasjm@gmail.com> | 2023-09-22 18:34:49 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-09-25 14:50:44 -0300 |
commit | 15af6c619de70336bcdfbabbd32b9d93aabefc5b (patch) | |
tree | 5dff83b07f9ffcb26cd4eb595f9e80f549ae25b5 /packages/demobank-ui/src/components | |
parent | 5640f0a67dcc31fa2b5fa0992abca8a55bc00dd8 (diff) | |
download | wallet-core-15af6c619de70336bcdfbabbd32b9d93aabefc5b.tar.xz |
towards new core bank api
Diffstat (limited to 'packages/demobank-ui/src/components')
-rw-r--r-- | packages/demobank-ui/src/components/Routing.tsx | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/packages/demobank-ui/src/components/Routing.tsx b/packages/demobank-ui/src/components/Routing.tsx index 90d2d4c48..d51bd01eb 100644 --- a/packages/demobank-ui/src/components/Routing.tsx +++ b/packages/demobank-ui/src/components/Routing.tsx @@ -27,6 +27,7 @@ import { Test } from "../pages/Test.js"; import { useBackendContext } from "../context/backend.js"; import { LoginForm } from "../pages/LoginForm.js"; import { AdminHome } from "../pages/admin/Home.js"; +import { bankUiSettings } from "../settings.js"; export function Routing(): VNode { const history = createHashHistory(); @@ -46,6 +47,10 @@ export function Routing(): VNode { )} /> <Route + path="/public-accounts" + component={() => <PublicHistoriesPage />} + /> + <Route path="/operation/:wopid" component={({ wopid }: { wopid: string }) => ( <WithdrawalOperationPage @@ -53,22 +58,21 @@ export function Routing(): VNode { onContinue={() => { route("/account"); }} - // onLoadNotOk={() => { - // route("/account"); - // }} - /> - )} - /> - <Route - path="/register" - component={() => ( - <RegistrationPage - onComplete={() => { - route("/account"); - }} /> )} /> + {bankUiSettings.allowRegistrations && + <Route + path="/register" + component={() => ( + <RegistrationPage + onComplete={() => { + route("/account"); + }} + /> + )} + /> + } <Route default component={Redirect} to="/login" /> </Router> </BankFrame> @@ -94,16 +98,6 @@ export function Routing(): VNode { component={() => <PublicHistoriesPage />} /> <Route - path="/register" - component={() => ( - <RegistrationPage - onComplete={() => { - route("/account"); - }} - /> - )} - /> - <Route path="/account" component={() => { if (isUserAdministrator) { |