-
-
-
+ view! {
},
+ )
+ }}
+
+
+ {move || {
+ let is_own_account = try_or_redirect_opt!(is_own_account() ?);
+ Some(
+ view! {
+
+
+
+ },
+ )
+ }}
+
+
+
+
All Tokens
+
+ {move || {
+ let canister_id = try_or_redirect_opt!(canister_id() ?);
+ Some(
+ view! {
+
},
)
}}
-
-
- {move || {
- let is_own_account = try_or_redirect_opt!(is_own_account()?);
- Some(
- view! {
-
-
- {if is_own_account { "My Tokens" } else { "Tokens" }}
-
-
- },
- )
- }}
-
-
-
- {move || {
- let canister_id = try_or_redirect_opt!(canister_id() ?);
- Some(
- view! {
-
- },
- )
- }}
-
-
diff --git a/ssr/src/page/wallet/tokens.rs b/ssr/src/page/wallet/tokens.rs
index 41c462bd..0866af95 100644
--- a/ssr/src/page/wallet/tokens.rs
+++ b/ssr/src/page/wallet/tokens.rs
@@ -2,9 +2,17 @@ use candid::Principal;
use yral_canisters_common::cursored_data::token_roots::TokenRootList;
use yral_canisters_common::utils::token::{RootType, TokenMetadata};
-use crate::page::wallet::ShareButtonWithFallbackPopup;
+use crate::component::icons::{
+ airdrop_icon::AirdropIcon, arrow_left_right_icon::ArrowLeftRightIcon,
+ chevron_right_icon::ChevronRightIcon, send_icon::SendIcon, share_icon::ShareIcon,
+};
+use crate::component::overlay::PopupOverlay;
+use crate::component::share_popup::ShareContent;
+use crate::page::icpump::ActionButton;
+use crate::utils::host::get_host;
use crate::utils::token::icpump::IcpumpTokenInfo;
use crate::{component::infinite_scroller::InfiniteScroller, state::canisters::unauth_canisters};
+
use leptos::*;
use leptos_icons::*;
@@ -37,12 +45,7 @@ pub fn TokenView(
{move || {
info.map(|info| {
- view! {
-
- }
+ view! { }
})
}}
@@ -63,73 +66,9 @@ fn generate_share_link_from_metadata(
)
}
-#[component]
-pub fn TokenTile(user_principal: Principal, token_meta_data: TokenMetadata) -> impl IntoView {
- let share_link = generate_share_link_from_metadata(&token_meta_data, user_principal);
- let share_link_s = store_value(share_link);
- let share_message = format!(
- "Hey! Check out the token: {} I created on YRAL 👇 {}. I just minted my own token—come see and create yours! 🚀 #YRAL #TokenMinter",
- token_meta_data.symbol,
- share_link_s(),
- );
- let share_message_s = store_value(share_message);
- let info = token_meta_data;
- view! {
-
- }
-}
-
#[component]
pub fn TokenList(user_principal: Principal, user_canister: Principal) -> impl IntoView {
- let canisters = unauth_canisters();
+ let canisters: yral_canisters_common::Canisters = unauth_canisters();
let provider = TokenRootList {
canisters,
@@ -144,10 +83,78 @@ pub fn TokenList(user_principal: Principal, user_canister: Principal) -> impl In
provider
fetch_count=10
children=move |token_root, _ref| {
- view! { }
+ view! {
+
+ }
}
/>
}
}
+
+#[component]
+pub fn WalletCard(user_principal: Principal, token_meta_data: TokenMetadata) -> impl IntoView {
+ let root: String = token_meta_data
+ .root
+ .map(|r| r.to_text())
+ .unwrap_or(token_meta_data.name.to_lowercase());
+
+ let share_link = generate_share_link_from_metadata(&token_meta_data, user_principal);
+ let share_link_s = store_value(share_link);
+ let share_message = format!(
+ "Hey! Check out the token: {} I created on YRAL 👇 {}. I just minted my own token—come see and create yours! 🚀 #YRAL #TokenMinter",
+ token_meta_data.symbol,
+ share_link_s(),
+ );
+ let share_message_s = store_value(share_message);
+ let pop_up = create_rw_signal(false);
+ let base_url = get_host();
+ view! {
+