From 1e4f21cc76345f3881ea8e5ea0e94d27d26da609 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 26 Sep 2023 15:18:43 -0300
Subject: lang selector and fix logout

---
 packages/demobank-ui/src/components/app.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'packages/demobank-ui/src/components/app.tsx')

diff --git a/packages/demobank-ui/src/components/app.tsx b/packages/demobank-ui/src/components/app.tsx
index a587c6f1e..f15a9ee6a 100644
--- a/packages/demobank-ui/src/components/app.tsx
+++ b/packages/demobank-ui/src/components/app.tsx
@@ -78,17 +78,17 @@ function VersionCheck({ children }: { children: ComponentChildren }): VNode {
   if (checked === undefined) {
     return <Loading />
   }
-  if (typeof checked ===  "string") {
+  if (checked.type === "wrong") {
     return <BankFrame>
       the bank backend is not supported. supported version "{BANK_INTEGRATION_PROTOCOL_VERSION}", server version "{checked}"
     </BankFrame>
   }
-  if (checked === true) {
+  if (checked.type === "ok") {
     return <Fragment>{children}</Fragment>
   }
   
   return <BankFrame>
-    <ErrorLoading error={checked}/>
+    <ErrorLoading error={checked.result}/>
   </BankFrame>
 }
 
-- 
cgit v1.2.3

