Skip to content

Commit

Permalink
feat(frontend/session): Show a message when a session drop occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
Grohden committed Aug 1, 2020
1 parent fc8c163 commit 5df2cff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'api/tagger/repository_tagger_client.dart';
import 'generated_env.dart';
import 'router.dart';
import 'services/session_service.dart';
import 'ui/organisms/adaptive_dialog.dart';
import 'ui/pages/home/home_page.dart' show HomeBinding, HomePage;
import 'ui/pages/login/login_page.dart' show LoginBinding, LoginPage;
import 'ui/pages/register/register_page.dart';
Expand Down Expand Up @@ -39,6 +40,10 @@ class TaggerApp extends StatelessWidget {

await session.clearToken();
Router.getOffAllToLogin();
Get.dialog(AdaptiveDialog.alert(
title: const Text('Log in required'),
content: const Text('Your session is not valid anymore'),
));
}
}))
..interceptors.add(
Expand Down

0 comments on commit 5df2cff

Please sign in to comment.