Fix ViewIcons & plugins that use image modals
Co-Authored-By: sadan <117494111+sadan4@users.noreply.github.com>
This commit is contained in:
parent
58c3032bb2
commit
a11ccde40f
9 changed files with 114 additions and 54 deletions
|
|
@ -80,7 +80,10 @@ function GuildInfoModal({ guild }: GuildProps) {
|
|||
className={cl("banner")}
|
||||
src={bannerUrl}
|
||||
alt=""
|
||||
onClick={() => openImageModal(bannerUrl)}
|
||||
onClick={() => openImageModal({
|
||||
url: bannerUrl,
|
||||
width: 1024
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
@ -89,7 +92,11 @@ function GuildInfoModal({ guild }: GuildProps) {
|
|||
? <img
|
||||
src={iconUrl}
|
||||
alt=""
|
||||
onClick={() => openImageModal(iconUrl)}
|
||||
onClick={() => openImageModal({
|
||||
url: iconUrl,
|
||||
height: 512,
|
||||
width: 512,
|
||||
})}
|
||||
/>
|
||||
: <div aria-hidden className={classes(IconClasses.childWrapper, IconClasses.acronym)}>{guild.acronym}</div>
|
||||
}
|
||||
|
|
@ -151,7 +158,15 @@ function Owner(guildId: string, owner: User) {
|
|||
|
||||
return (
|
||||
<div className={cl("owner")}>
|
||||
<img src={ownerAvatarUrl} alt="" onClick={() => openImageModal(ownerAvatarUrl)} />
|
||||
<img
|
||||
src={ownerAvatarUrl}
|
||||
alt=""
|
||||
onClick={() => openImageModal({
|
||||
url: ownerAvatarUrl,
|
||||
height: 512,
|
||||
width: 512
|
||||
})}
|
||||
/>
|
||||
{Parser.parse(`<@${owner.id}>`)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue