fix: remove duplicate AuthLayout wrapping in admin_handlers
main.dart builder already wraps unauthenticated routes in AuthLayout. Wrapping again in handlers caused double login screen on all viewports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
014d20604f
commit
f60e268375
@@ -1,5 +1,4 @@
|
||||
import 'package:prosapp_web_app/providers/auth_provider.dart';
|
||||
import 'package:prosapp_web_app/ui/layouts/auth/auth_layout.dart';
|
||||
import 'package:prosapp_web_app/ui/views/dashboard_view.dart';
|
||||
import 'package:prosapp_web_app/ui/views/login_view.dart';
|
||||
import 'package:prosapp_web_app/ui/views/phone_login_view.dart';
|
||||
@@ -11,7 +10,7 @@ class AdminHandlers {
|
||||
static Handler phone = Handler(handlerFunc: (context, params) {
|
||||
final authProvider = Provider.of<AuthProvider>(context!);
|
||||
if (authProvider.authStatus == AuthStatus.notAuthenticated) {
|
||||
return const AuthLayout(child: PhoneLoginView());
|
||||
return const PhoneLoginView();
|
||||
} else {
|
||||
return const DashboardView();
|
||||
}
|
||||
@@ -20,7 +19,7 @@ class AdminHandlers {
|
||||
static Handler login = Handler(handlerFunc: (context, params) {
|
||||
final authProvider = Provider.of<AuthProvider>(context!);
|
||||
if (authProvider.authStatus == AuthStatus.notAuthenticated) {
|
||||
return const AuthLayout(child: LoginView());
|
||||
return const LoginView();
|
||||
} else {
|
||||
return const DashboardView();
|
||||
}
|
||||
@@ -29,7 +28,7 @@ class AdminHandlers {
|
||||
static Handler register = Handler(handlerFunc: (context, params) {
|
||||
final authProvider = Provider.of<AuthProvider>(context!);
|
||||
if (authProvider.authStatus == AuthStatus.notAuthenticated) {
|
||||
return const AuthLayout(child: RegisterView());
|
||||
return const RegisterView();
|
||||
} else {
|
||||
return const DashboardView();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user