From fb692dcb9d4fda281ea5d088c49d0e8734264797 Mon Sep 17 00:00:00 2001 From: joel-medicala-yral Date: Wed, 11 Dec 2024 14:00:33 +0530 Subject: [PATCH] added new button component like ActionButton but with handlers --- ssr/src/page/icpump/mod.rs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/ssr/src/page/icpump/mod.rs b/ssr/src/page/icpump/mod.rs index baa80d0d..481afa88 100644 --- a/ssr/src/page/icpump/mod.rs +++ b/ssr/src/page/icpump/mod.rs @@ -17,6 +17,7 @@ use crate::utils::token::firestore::init_firebase; use crate::utils::token::firestore::listen_to_documents; use crate::utils::token::icpump::get_paginated_token_list; use crate::utils::token::icpump::TokenListItem; +use crate::utils::web::copy_to_clipboard; pub mod ai; @@ -142,7 +143,8 @@ pub fn TokenCard( .trim_end_matches('/') .split('/') .last() - .expect("URL should have at least one segment"); + .expect("URL should have at least one segment") + .to_string(); // Convert to owned String view! {
- + - + @@ -252,6 +254,24 @@ pub fn ActionButton( } } +#[component] +pub fn ActionButtonWithHandler( + label: String, + children: Children, + #[prop(optional, default = false)] disabled: bool, + on_click: impl Fn() + 'static, +) -> impl IntoView { + view! { + + } +} #[component] pub fn TelegramIcon(href: String, classes: String) -> impl IntoView { view! {