-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use userDetails from google-login in profile section
- Loading branch information
1 parent
bc9ce55
commit 96cb4c6
Showing
5 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
12 changes: 8 additions & 4 deletions
12
src/frontend/src/components/Dashboard/DashboardSidebar/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
interface IUserAvatarProps { | ||
name: string; | ||
className?: string; | ||
imageSource?: string; | ||
} | ||
|
||
export default function UserAvatar({ name, className }: IUserAvatarProps) { | ||
const nameParts = name?.split(' '); | ||
const firstNameInitial = nameParts?.[0] ? nameParts?.[0][0] : ''; | ||
|
||
export default function UserAvatar({ | ||
className, | ||
imageSource, | ||
}: IUserAvatarProps) { | ||
return ( | ||
<div | ||
className={`naxatw-flex naxatw-h-8 naxatw-w-8 naxatw-items-center naxatw-justify-center naxatw-rounded-full naxatw-bg-red naxatw-text-body-md naxatw-font-semibold naxatw-capitalize naxatw-text-white ${className}`} | ||
> | ||
{firstNameInitial || '-'} | ||
<img src={imageSource} alt="profile" /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters