Email confirmation page after SignUp
This commit is contained in:
@@ -9,6 +9,7 @@ enum Pages {
|
||||
methods,
|
||||
verify,
|
||||
signup,
|
||||
signupConfirm,
|
||||
settings,
|
||||
dashboard,
|
||||
profile,
|
||||
@@ -57,4 +58,4 @@ void navigateNamedAndReplace(BuildContext context, Pages page, {String? objectRe
|
||||
|
||||
void navigateNext(BuildContext context, Pages page, {Object? extra}) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => navigate(context, page, extra: extra));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import 'package:pweb/pages/2fa/page.dart';
|
||||
import 'package:pweb/pages/errors/not_found.dart';
|
||||
import 'package:pweb/pages/login/page.dart';
|
||||
import 'package:pweb/pages/signup/page.dart';
|
||||
import 'package:pweb/pages/signup/confirmation/args.dart';
|
||||
import 'package:pweb/pages/signup/confirmation/page.dart';
|
||||
import 'package:pweb/pages/verification/page.dart';
|
||||
|
||||
|
||||
@@ -36,6 +38,15 @@ GoRouter createRouter() => GoRouter(
|
||||
path: routerPage(Pages.signup),
|
||||
builder: (_, __) => const SignUpPage(),
|
||||
),
|
||||
GoRoute(
|
||||
name: Pages.signupConfirm.name,
|
||||
path: routerPage(Pages.signupConfirm),
|
||||
builder: (_, state) => SignUpConfirmationPage(
|
||||
email: state.extra is SignupConfirmationArgs
|
||||
? (state.extra as SignupConfirmationArgs).email
|
||||
: null,
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
name: Pages.verify.name,
|
||||
path: '${routerPage(Pages.verify)}${routerAddParam(PageParams.token)}',
|
||||
@@ -46,4 +57,4 @@ GoRouter createRouter() => GoRouter(
|
||||
payoutShellRoute(),
|
||||
],
|
||||
errorBuilder: (_, __) => const NotFoundPage(),
|
||||
);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user