aex/src/components/sidebar/image.rs
yaroslav k 257f254b13 document every function, trait and struct in src/
Doc comments on all modules, components, entities, helpers and type
aliases; larger comments on the important entities (Dashboard, PlayerData,
Context, App, Numput, item data). No behavior changes.
2026-08-04 09:21:25 +03:00

17 lines
437 B
Rust

use crate::prelude::*;
use leptos::prelude::*;
/// Character portrait; hidden while no image URL is set.
#[component]
pub fn Image () -> impl IntoView {
let state = expect_context::<Context>();
let image = state.player().image();
view! {
<Show when=move || !image.get().is_empty() >
<div class="character-image">
<img src=move || image.get() />
</div>
</Show>
}
}