diff --git a/ssr/src/page/token/popups.rs b/ssr/src/page/token/popups.rs index ee1b90c9..d8cb664b 100644 --- a/ssr/src/page/token/popups.rs +++ b/ssr/src/page/token/popups.rs @@ -96,16 +96,50 @@ 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! { - }