From 94ae6dd5d2c5dd288b3afe90585c60ab08391ce3 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 21 Aug 2025 15:01:41 +0200 Subject: [PATCH] update Mzansi Directory nav pt2 --- .../mih_review_business_window.dart | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart index 45dbf607..48de194b 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart @@ -94,23 +94,13 @@ class _MihReviewBusinessWindowState extends State { widget.business.rating, ) .then((statusCode) { - Navigator.of(context).pop(); //Remove loading dialog - Navigator.of(context).pop(); //Remove delete dialog + context.pop(); //Remove loading dialog + context.pop(); //Remove delete dialog if (statusCode == 200) { - Navigator.of(context).pop(); //Remove window - Navigator.of(context).pop(); //Remove profile - Navigator.of(context).pop(); //Remove directory - Navigator.of(context).pushNamed( - '/mzansi-directory', - arguments: MzansiDirectoryArguments( - personalSearch: false, // personalSearch - startSearchText: widget.business.Name, - ), - ); - MihAlertServices().successAlert( + context.pop(); //Remove window + successPopUp( "Successfully Deleted Review!", "Your review has successfully been delete and will no longer appear under the business.", - context, ); } else { MihAlertServices().errorAlert( @@ -137,7 +127,7 @@ class _MihReviewBusinessWindowState extends State { MihButton( width: 300, onPressed: () { - Navigator.of(context).pop(); + context.pop(); }, buttonColor: MihColors.getGreenColor( MzansiInnovationHub.of(context)!.theme.mode == "Dark"),