From 891c2d4db28229048cbae2922b40c2e728452c9d Mon Sep 17 00:00:00 2001 From: Prakash Bhatt Date: Thu, 19 Sep 2024 14:06:12 +0530 Subject: [PATCH 1/2] Fix: Create token error popup update --- ssr/src/page/token/popups.rs | 40 ++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/ssr/src/page/token/popups.rs b/ssr/src/page/token/popups.rs index ee1b90c9..171c74ae 100644 --- a/ssr/src/page/token/popups.rs +++ b/ssr/src/page/token/popups.rs @@ -96,16 +96,47 @@ fn ErrorPopup HeadIV>( } } +#[component] +fn CreateTokenErrorPopupInner HeadIV>( + error: String, + header: Head, + close_popup: WriteSignal, +) -> impl IntoView { + view! { +
+
+ +
+ {header()} + + +
+ } +} + #[component] fn CreateTokenErrorPopup( error: String, token_name: MaybeSignal, close_popup: WriteSignal, ) -> impl IntoView { - let profile_url = String::from("/your-profile?tab=tokens"); - + let error = if error.to_lowercase().contains(&"CanisterError".to_lowercase()) { + "Oops! There is some error from ICP's end. Please try again".into() + } else { + error + }; view! { - } From c6ba1b3bb5491224469605b1c567326680854e3c Mon Sep 17 00:00:00 2001 From: Prakash Bhatt Date: Thu, 19 Sep 2024 14:07:30 +0530 Subject: [PATCH 2/2] Fix: Create token error popup update --- ssr/src/page/token/popups.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ssr/src/page/token/popups.rs b/ssr/src/page/token/popups.rs index 171c74ae..d8cb664b 100644 --- a/ssr/src/page/token/popups.rs +++ b/ssr/src/page/token/popups.rs @@ -130,7 +130,10 @@ fn CreateTokenErrorPopup( token_name: MaybeSignal, close_popup: WriteSignal, ) -> impl IntoView { - let error = if error.to_lowercase().contains(&"CanisterError".to_lowercase()) { + let error = if error + .to_lowercase() + .contains(&"CanisterError".to_lowercase()) + { "Oops! There is some error from ICP's end. Please try again".into() } else { error