Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default profile picture #847

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading