From 0d2026c1008e4f1e82b2994a6b1679cd50b4cf0f Mon Sep 17 00:00:00 2001 From: David Walsh Date: Fri, 22 Mar 2024 14:21:51 -0500 Subject: [PATCH] Hide the toast when outside click --- ui/pages/routes/routes.component.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index 1b640c664551..e7ee190fad66 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -695,6 +695,9 @@ export default class Routes extends Component { ); ///: END:ONLY_INCLUDE_IF + const showAutoNetworkSwitchToast = + switchedNetworkDetails && !neverShowSwitchedNetworkMessage; + return (
setSwitchedNetworkDetails(null) + : undefined + } > {shouldShowNetworkDeprecationWarning ? : null} {shouldShowNetworkInfo && } @@ -788,7 +796,7 @@ export default class Routes extends Component { onClose={() => this.setState({ hideConnectAccountToast: true })} /> ) : null} - {switchedNetworkDetails && !neverShowSwitchedNetworkMessage ? ( + {showAutoNetworkSwitchToast ? (