fix reactions modal pfp

This commit is contained in:
Alejandro Gomez 2023-02-12 22:40:02 +01:00 committed by Kieran
parent 8fb34cbbb0
commit 0a1bd42bb6
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 7 additions and 5 deletions

View File

@ -16,6 +16,7 @@ export interface ProfileImageProps {
showUsername?: boolean; showUsername?: boolean;
className?: string; className?: string;
link?: string; link?: string;
autoWidth?: boolean;
defaultNip?: string; defaultNip?: string;
verifyNip?: boolean; verifyNip?: boolean;
linkToProfile?: boolean; linkToProfile?: boolean;
@ -27,6 +28,7 @@ export default function ProfileImage({
showUsername = true, showUsername = true,
className, className,
link, link,
autoWidth = true,
defaultNip, defaultNip,
verifyNip, verifyNip,
linkToProfile = true, linkToProfile = true,
@ -63,7 +65,7 @@ export default function ProfileImage({
{nip05 && <Nip05 nip05={nip05} pubkey={pubkey} verifyNip={verifyNip} />} {nip05 && <Nip05 nip05={nip05} pubkey={pubkey} verifyNip={verifyNip} />}
</Link> </Link>
</div> </div>
<div className="subheader" style={{ width: width - 190 }}> <div className="subheader" style={{ width: autoWidth ? width - 190 : "" }}>
{subHeader} {subHeader}
</div> </div>
</div> </div>

View File

@ -96,7 +96,7 @@ const Reactions = ({ show, setShow, positive, negative, reposts, zaps }: Reactio
<div className="reaction-icon"> <div className="reaction-icon">
{ev.content === "+" ? <Heart width={20} height={18} /> : ev.content} {ev.content === "+" ? <Heart width={20} height={18} /> : ev.content}
</div> </div>
<ProfileImage pubkey={ev.pubkey} /> <ProfileImage autoWidth={false} pubkey={ev.pubkey} />
</div> </div>
); );
})} })}
@ -109,7 +109,7 @@ const Reactions = ({ show, setShow, positive, negative, reposts, zaps }: Reactio
<ZapIcon width={17} height={20} /> <ZapIcon width={17} height={20} />
<span className="zap-amount">{formatShort(z.amount)}</span> <span className="zap-amount">{formatShort(z.amount)}</span>
</div> </div>
<ProfileImage pubkey={z.zapper} subHeader={<>{z.content}</>} /> <ProfileImage autoWidth={false} pubkey={z.zapper} subHeader={<>{z.content}</>} />
</div> </div>
) )
); );
@ -121,7 +121,7 @@ const Reactions = ({ show, setShow, positive, negative, reposts, zaps }: Reactio
<div className="reaction-icon"> <div className="reaction-icon">
<Heart width={20} height={18} /> <Heart width={20} height={18} />
</div> </div>
<ProfileImage pubkey={ev.pubkey} /> <ProfileImage autoWidth={false} pubkey={ev.pubkey} />
</div> </div>
); );
})} })}
@ -132,7 +132,7 @@ const Reactions = ({ show, setShow, positive, negative, reposts, zaps }: Reactio
<div className="reaction-icon"> <div className="reaction-icon">
<Dislike width={20} height={18} /> <Dislike width={20} height={18} />
</div> </div>
<ProfileImage pubkey={ev.pubkey} /> <ProfileImage autoWidth={false} pubkey={ev.pubkey} />
</div> </div>
); );
})} })}