From 8e8bbc2ee91a6a5817d17b5ac31e002533b2da4f Mon Sep 17 00:00:00 2001 From: joel-medicala-yral Date: Wed, 11 Dec 2024 15:08:13 +0530 Subject: [PATCH] replaced icons with more pragmatic leptos::icon_gen macro --- ssr/src/component/icons/airdrop_icon.rs | 24 ++++++------------ .../component/icons/arrow_left_right_icon.rs | 24 ++++++------------ ssr/src/component/icons/chevron_right_icon.rs | 24 ++++++------------ ssr/src/component/icons/send_icon.rs | 25 ++++++------------- ssr/src/component/icons/share_icon.rs | 24 ++++++------------ ssr/src/page/icpump/mod.rs | 17 +++++++------ 6 files changed, 44 insertions(+), 94 deletions(-) diff --git a/ssr/src/component/icons/airdrop_icon.rs b/ssr/src/component/icons/airdrop_icon.rs index 2512702b..ac923889 100755 --- a/ssr/src/component/icons/airdrop_icon.rs +++ b/ssr/src/component/icons/airdrop_icon.rs @@ -1,17 +1,9 @@ -use leptos::*; +use crate::utils::icon::icon_gen; -#[component] -pub fn AirdropIcon( - #[prop(optional, default = "w-full h-full".to_string())] classes: String, -) -> impl IntoView { - view! { - - - - - } -} + "### +); diff --git a/ssr/src/component/icons/arrow_left_right_icon.rs b/ssr/src/component/icons/arrow_left_right_icon.rs index afdc932e..e0ceb6fd 100755 --- a/ssr/src/component/icons/arrow_left_right_icon.rs +++ b/ssr/src/component/icons/arrow_left_right_icon.rs @@ -1,17 +1,9 @@ -use leptos::*; +use crate::utils::icon::icon_gen; -#[component] -pub fn ArrowLeftRightIcon( - #[prop(optional, default = "w-full h-full".to_string())] classes: String, -) -> impl IntoView { - view! { - - - - - } -} + "### +); diff --git a/ssr/src/component/icons/chevron_right_icon.rs b/ssr/src/component/icons/chevron_right_icon.rs index e045dc76..6024a15c 100755 --- a/ssr/src/component/icons/chevron_right_icon.rs +++ b/ssr/src/component/icons/chevron_right_icon.rs @@ -1,20 +1,10 @@ -use leptos::*; +use crate::utils::icon::icon_gen; -#[component] -pub fn ChevronRightIcon( - #[prop(optional, default = "w-full h-full".to_string())] classes: String, -) -> impl IntoView { - view! { - - - - } -} + />"### +); diff --git a/ssr/src/component/icons/send_icon.rs b/ssr/src/component/icons/send_icon.rs index fbed9d7c..c20b8a7f 100755 --- a/ssr/src/component/icons/send_icon.rs +++ b/ssr/src/component/icons/send_icon.rs @@ -1,18 +1,9 @@ -use leptos::*; +use crate::utils::icon::icon_gen; -#[component] -pub fn SendIcon( - #[prop(optional, default = "w-full h-full".to_string())] classes: String, - #[prop(optional)] filled: bool, -) -> impl IntoView { - view! { - - - - - } -} + "### +); diff --git a/ssr/src/component/icons/share_icon.rs b/ssr/src/component/icons/share_icon.rs index fda5a53e..04aca169 100755 --- a/ssr/src/component/icons/share_icon.rs +++ b/ssr/src/component/icons/share_icon.rs @@ -1,17 +1,9 @@ -use leptos::*; +use crate::utils::icon::icon_gen; -#[component] -pub fn ShareIcon( - #[prop(optional, default = "w-full h-full".to_string())] classes: String, -) -> impl IntoView { - view! { - - - - - } -} + "### +); diff --git a/ssr/src/page/icpump/mod.rs b/ssr/src/page/icpump/mod.rs index 481afa88..126148e9 100644 --- a/ssr/src/page/icpump/mod.rs +++ b/ssr/src/page/icpump/mod.rs @@ -3,6 +3,7 @@ use std::collections::VecDeque; use futures::StreamExt; use leptos::*; +use leptos_icons::Icon; use crate::component::buttons::LinkButton; use crate::component::icons::airdrop_icon::AirdropIcon; @@ -188,19 +189,19 @@ pub fn TokenCard(
- + - + - + - - + + - +
@@ -219,7 +220,7 @@ pub fn PageSelector(page: RwSignal, end_of_list: RwSignal) -> impl In } disabled=move || page.get() == 1 > - +
{page}
}