mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 22:01:13 +00:00
Add default profile picture for users who do not set one (#1339)
This commit is contained in:
parent
7c2a471031
commit
4bdddb1710
2 changed files with 7 additions and 13 deletions
|
@ -107,16 +107,6 @@ export class PersonDetails extends Component<PersonDetailsProps, any> {
|
|||
setupTippy();
|
||||
}
|
||||
|
||||
// TODO wut?
|
||||
// componentDidUpdate(lastProps: UserDetailsProps) {
|
||||
// for (const key of Object.keys(lastProps)) {
|
||||
// if (lastProps[key] !== this.props[key]) {
|
||||
// this.fetchUserData();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
|
|
|
@ -73,10 +73,14 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
|||
const avatar = this.props.person.avatar;
|
||||
return (
|
||||
<>
|
||||
{avatar &&
|
||||
!this.props.hideAvatar &&
|
||||
{!this.props.hideAvatar &&
|
||||
!this.props.person.banned &&
|
||||
showAvatars() && <PictrsImage src={avatar} icon />}
|
||||
showAvatars() && (
|
||||
<PictrsImage
|
||||
src={avatar ?? "/static/assets/icons/icon-96x96.png"}
|
||||
icon
|
||||
/>
|
||||
)}
|
||||
<span>{displayName}</span>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue