diff --git a/ultros-frontend/ultros-app/src/components/related_items.rs b/ultros-frontend/ultros-app/src/components/related_items.rs index a74fd056..38f052a8 100644 --- a/ultros-frontend/ultros-app/src/components/related_items.rs +++ b/ultros-frontend/ultros-app/src/components/related_items.rs @@ -1,11 +1,13 @@ use itertools::Itertools; /// Related items links items that are related to the current set use leptos::*; -use ultros_api_types::cheapest_listings::CheapestListingMapKey; +use leptos_router::A; +use ultros_api_types::{cheapest_listings::CheapestListingMapKey, icon_size::IconSize}; use xiv_gen::{Item, ItemId, Recipe}; use crate::{ - components::skeleton::SingleLineSkeleton, global_state::cheapest_prices::CheapestPrices, + components::{item_icon::ItemIcon, skeleton::SingleLineSkeleton}, + global_state::{cheapest_prices::CheapestPrices, home_world::get_price_zone}, }; use super::{cheapest_price::*, gil::*, small_item_display::*}; @@ -156,6 +158,7 @@ fn Recipe(recipe: &'static Recipe) -> impl IntoView { pub fn RelatedItems(#[prop(into)] item_id: Signal) -> impl IntoView { let db = xiv_gen_db::data(); let item = create_memo(move |_| db.items.get(&ItemId(item_id()))); + let (price_zone, _) = get_price_zone(); let item_set = move || { item() .map(|item| { @@ -164,12 +167,19 @@ pub fn RelatedItems(#[prop(into)] item_id: Signal) -> impl IntoView { .chain(suffix_item_iterator(item)) .unique_by(|i| i.key_id) .filter(|i| i.item_search_category.0 > 0) + .filter(|i| i.key_id.0 != item.key_id.0) .map(|item| { view! { -
- -
"price: "
-
+ +
+ + {&item.name} + {item.level_item.0} +
+
+
} }) .take(15) @@ -184,9 +194,9 @@ pub fn RelatedItems(#[prop(into)] item_id: Signal) -> impl IntoView { .collect::>() }); - view! {
+ view! {
"related items" -
{item_set}
+
{item_set}
"crafting recipes" diff --git a/ultros-frontend/ultros-app/src/routes/item_view.rs b/ultros-frontend/ultros-app/src/routes/item_view.rs index 9f1745e3..5f426e1d 100644 --- a/ultros-frontend/ultros-app/src/routes/item_view.rs +++ b/ultros-frontend/ultros-app/src/routes/item_view.rs @@ -264,6 +264,7 @@ pub fn ItemView() -> impl IntoView { "Garland Tools"
+
"Item level: "{move || items.get(&ItemId(item_id())).map(|item| item.level_item.0).unwrap_or_default()}
{move || view!{}}
{move || view!{}}