diff --git a/src/components/personal.rs b/src/components/personal.rs index 9a68575..6cb8090 100644 --- a/src/components/personal.rs +++ b/src/components/personal.rs @@ -3,7 +3,6 @@ use leptos::*; use leptos_icons::*; use crate::auth::get_user; use crate::auth::logout; -use crate::models::User; #[component] pub fn Personal() -> impl IntoView { @@ -24,10 +23,26 @@ pub fn Profile() -> impl IntoView { set_dropdown_open.update(|value| *value = !*value); }; + let user_profile_picture = move || { + user.get().map(|user| { + if let Ok(user) = user { + return format!("/assets/images/profile/{}.webp", user.id.unwrap()); + } else { + return "".to_string(); + } + }) + }; + view! {