diff options
Diffstat (limited to 'packages/demobank-ui/src/components/Routing.tsx')
-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) { |