diff --git a/frontend/src/components/common/Avatar/Avatar.interface.ts b/frontend/src/components/common/Avatar/Avatar.interface.ts index bf712838..e545a0c6 100644 --- a/frontend/src/components/common/Avatar/Avatar.interface.ts +++ b/frontend/src/components/common/Avatar/Avatar.interface.ts @@ -1,7 +1,6 @@ export interface AvatarProps { variant?: AvatarVariant; - firstName: string; - lastName: string; + initials: string; imageUrl?: string | undefined; } diff --git a/frontend/src/components/common/Avatar/Avatar.tsx b/frontend/src/components/common/Avatar/Avatar.tsx index eab27758..d9b83360 100644 --- a/frontend/src/components/common/Avatar/Avatar.tsx +++ b/frontend/src/components/common/Avatar/Avatar.tsx @@ -13,21 +13,24 @@ const variants: { '320': 'w-80 h-80 text-5xl', }; -export const Avatar: React.FC = ({ firstName, lastName, imageUrl, variant = '40' }) => { +export const Avatar: React.FC = ({ initials, imageUrl, variant = '40' }) => { const avatarClass = generateClassNames( - 'rounded-full bg-blue-700 flex justify-center items-center', + 'rounded-full bg-blue-700 flex justify-center items-center object-cover', variants[variant], ); return (
{imageUrl ? ( - User avatar + User avatar ) : ( - - {firstName[0]} - {lastName[0]} - + {initials} )}
); diff --git a/frontend/src/components/modules/Topbar/Topbar.tsx b/frontend/src/components/modules/Topbar/Topbar.tsx index 09f7965c..2987ae75 100644 --- a/frontend/src/components/modules/Topbar/Topbar.tsx +++ b/frontend/src/components/modules/Topbar/Topbar.tsx @@ -45,7 +45,7 @@ export const Topbar = () => { Open user menu - + = ({ people }) => { return ( @@ -44,16 +44,12 @@ export const PeopleTable: FC = ({ people }) => { {people?.map((person) => ( +
-
- User image -
{person.name} diff --git a/frontend/src/components/pages/ProfileSetting/modules/PersonalDetails/PersonalDetails.tsx b/frontend/src/components/pages/ProfileSetting/modules/PersonalDetails/PersonalDetails.tsx index 1b7f7026..5cc9fea4 100644 --- a/frontend/src/components/pages/ProfileSetting/modules/PersonalDetails/PersonalDetails.tsx +++ b/frontend/src/components/pages/ProfileSetting/modules/PersonalDetails/PersonalDetails.tsx @@ -32,7 +32,7 @@ export const PersonalDetails: React.FC = ({ data }) => { Profile photo - +