From ef4ff0f1cc9082e104706e5ee5f6bf09b0aa4ba8 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 18 Sep 2023 15:32:33 +0300 Subject: [PATCH] Demo is loading /clients instead of /dashboard --- lib/redux/app/app_middleware.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/redux/app/app_middleware.dart b/lib/redux/app/app_middleware.dart index 82a22a0051a..7779acc7c80 100644 --- a/lib/redux/app/app_middleware.dart +++ b/lib/redux/app/app_middleware.dart @@ -563,9 +563,10 @@ Middleware _createViewMainScreen() { final action = dynamicAction as ViewMainScreen; if (store.state.uiState.currentRoute == LoginScreen.route) { - store.dispatch(UpdateCurrentRoute(store.state.userCompany.canViewDashboard - ? DashboardScreenBuilder.route - : ClientScreen.route)); + store.dispatch(UpdateCurrentRoute( + store.state.userCompany.canViewDashboard || store.state.isDemo + ? DashboardScreenBuilder.route + : ClientScreen.route)); } while (navigatorKey.currentState.canPop()) {