From c8da4f8146eb31d3a591f63330428d1a550ccfc9 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sat, 5 Nov 2022 03:24:38 -0700 Subject: [PATCH] Fix action item check if not authenticated --- src/renderer/router/app-outlet.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/router/app-outlet.tsx b/src/renderer/router/app-outlet.tsx index 621f32522..72bc44d37 100644 --- a/src/renderer/router/app-outlet.tsx +++ b/src/renderer/router/app-outlet.tsx @@ -34,7 +34,11 @@ export const AppOutlet = ({ redirectTo }: PrivateOutletProps) => { const actions = [isServerRequired, isCredentialRequired, isMpvRequired]; const actionRequired = actions.some((c) => c); - if (actionRequired) { + if (isAuthenticated) { + return ; + } + + if (isAuthenticated && actionRequired) { return ( { ); } - if (isAuthenticated) { - return ; - } - logout(); return ; };