From 5f7daadf8579c166cf667a56806d4bb341c47dba Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Tue, 2 Jun 2026 10:48:11 +0200 Subject: [PATCH] fix deep link for unsigned in user --- mih_ui/lib/mih_config/mih_go_router.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mih_ui/lib/mih_config/mih_go_router.dart b/mih_ui/lib/mih_config/mih_go_router.dart index a962b1dd..d4487056 100644 --- a/mih_ui/lib/mih_config/mih_go_router.dart +++ b/mih_ui/lib/mih_config/mih_go_router.dart @@ -77,8 +77,8 @@ class MihGoRouter { "${MihGoRouterPaths.mihAuthentication}/${MihGoRouterPaths.forgotPassword}", MihGoRouterPaths.resetPassword, "/${MihGoRouterPaths.aboutMih}", - "/${MihGoRouterPaths.businessProfileView}", - "/${MihGoRouterPaths.mzansiProfileView}", + "/${MihGoRouterPaths.businessProfileView}/:business_id", + "/${MihGoRouterPaths.mzansiProfileView}/:username", ]; KenLogger.success( "Redirect Check: ${state.fullPath}, isUserSignedIn: $isUserSignedIn"); @@ -88,8 +88,10 @@ class MihGoRouter { if (isUserSignedIn && unauthenticatedPaths.contains(state.fullPath) && state.fullPath != "/${MihGoRouterPaths.aboutMih}" && - state.fullPath != "/${MihGoRouterPaths.mzansiProfileView}" && - state.fullPath != "/${MihGoRouterPaths.businessProfileView}") { + state.fullPath != + "/${MihGoRouterPaths.mzansiProfileView}/:username" && + state.fullPath != + "/${MihGoRouterPaths.businessProfileView}/:business_id") { return MihGoRouterPaths.mihHome; } return null; // Stay on current route