use indexer_service_protocol::{Account, AccountId}; use leptos::prelude::*; use leptos_router::components::A; use crate::format_utils; /// Account preview component #[component] pub fn AccountPreview(account_id: AccountId, account: Option) -> impl IntoView { let account_id_str = format_utils::format_account_id(&account_id); view! {
{move || { account .as_ref() .map(|Account { program_owner, balance, data, nonce }| { let program_id = format_utils::format_program_id(program_owner); view! { } .into_any() }) .unwrap_or_else(|| { view! { } .into_any() }) }}
} }