Skip to content

Commit

Permalink
default profile picture in header and account
Browse files Browse the repository at this point in the history
  • Loading branch information
Beshr Islam Bouli authored and Beshr Islam Bouli committed Nov 9, 2024
1 parent d2b8322 commit d7e1257
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Binary file added frontend2/public/default_profile_picture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion frontend2/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ const Header: React.FC = () => {
<span className="sr-only">Open user menu</span>
<img
className="h-8 w-8 rounded-full bg-white"
src={user?.profile?.avatar_url}
src={
user?.profile?.avatar_url ??
"/default_profile_picture.png"
}
alt="Profile Picture"
/>
</Menu.Button>
Expand Down
2 changes: 1 addition & 1 deletion frontend2/src/views/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const ProfileForm: React.FC<{
<div className="flex flex-col items-center gap-6 p-4">
<img
className="h-24 w-24 rounded-full bg-gray-400 lg:h-48 lg:w-48"
src={user?.profile?.avatar_url}
src={user?.profile?.avatar_url ?? "/default_profile_picture.png"}
/>
<div className="text-center text-xl font-semibold">
{`${watchFirstName ?? ""} ${watchLastName ?? ""}`}
Expand Down

0 comments on commit d7e1257

Please sign in to comment.