rename component

This commit is contained in:
Austin 2023-03-23 19:46:02 +00:00
parent d509dc82a0
commit 7b27538c16
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
use crate::{
components::{
avatar::Avatar,
avatar::ShowAvatar,
change_password::ChangePasswordForm,
create_group::CreateGroupForm,
create_user::CreateUserForm,
@ -307,7 +307,7 @@ impl App {
id="dropdownUser"
data-bs-toggle="dropdown"
aria-expanded="false">
<Avatar username={user_id.clone()} width=32 height=32 />
<ShowAvatar username={user_id.clone()} width=32 height=32 />
<span class="ms-2">
{user_id}
</span>

View File

@ -26,7 +26,7 @@ impl AvatarData {
}
}
pub struct Avatar {
pub struct ShowAvatar {
common: CommonComponentParts<Self>,
avatar: Option<AvatarData>,
_producer: Box<dyn Bridge<AvatarEventBus>>,
@ -47,7 +47,7 @@ pub struct Props {
pub height: i32,
}
impl CommonComponent<Avatar> for Avatar {
impl CommonComponent<ShowAvatar> for ShowAvatar {
fn handle_msg(
&mut self,
ctx: &Context<Self>,
@ -77,7 +77,7 @@ impl CommonComponent<Avatar> for Avatar {
}
}
impl Avatar {
impl ShowAvatar {
fn get_user_avatar(&mut self, ctx: &Context<Self>) {
self.common.call_graphql::<GetUserAvatar, _>(
ctx,
@ -90,7 +90,7 @@ impl Avatar {
}
}
impl Component for Avatar {
impl Component for ShowAvatar {
type Message = Msg;
type Properties = Props;