Skip to content

Commit

Permalink
Demo is loading /clients instead of /dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Sep 18, 2023
1 parent 6b11ac8 commit ef4ff0f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/redux/app/app_middleware.dart
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,10 @@ Middleware<AppState> _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()) {
Expand Down

0 comments on commit ef4ff0f

Please sign in to comment.