From 5054ff6c6d200e8d4d7658e001b0bcb1936d6876 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian@dold.me>
Date: Wed, 13 Apr 2022 19:32:12 +0200
Subject: anastasis-webui: make TOTP work again

---
 packages/anastasis-webui/src/components/menu/SideBar.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'packages/anastasis-webui/src/components/menu/SideBar.tsx')

diff --git a/packages/anastasis-webui/src/components/menu/SideBar.tsx b/packages/anastasis-webui/src/components/menu/SideBar.tsx
index 023b2b63c..e265a817d 100644
--- a/packages/anastasis-webui/src/components/menu/SideBar.tsx
+++ b/packages/anastasis-webui/src/components/menu/SideBar.tsx
@@ -78,8 +78,7 @@ export function Sidebar({ mobile }: Props): VNode {
               </div>
             </li>
           )}
-          {reducer.currentReducerState &&
-          reducer.currentReducerState.backup_state ? (
+          {reducer.currentReducerState?.reducer_type === "backup" ? (
             <Fragment>
               <li
                 class={
@@ -191,8 +190,7 @@ export function Sidebar({ mobile }: Props): VNode {
               </li>
             </Fragment>
           ) : (
-            reducer.currentReducerState &&
-            reducer.currentReducerState?.recovery_state && (
+            reducer.currentReducerState?.reducer_type === "recovery" && (
               <Fragment>
                 <li
                   class={
-- 
cgit v1.2.3

