fix(app): request avatar and banner sizes the media proxy serves (#1842)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-24 12:29:16 +02:00
1 parent c3e747aaa4
commit bd381ccc74
8 files changed
+181 -563

No files matched your search

@@ -131,13 +131,10 @@ export const InviteAcceptModal = observer(function InviteAcceptModal({code}: Inv
if (!guild.id || !guild.splash) {
return null;
}
return AvatarUtils.getGuildSplashURL(
{
id: guild.id,
splash: guild.splash,
},
4096,
);
return AvatarUtils.getGuildSplashURL({
id: guild.id,
splash: guild.splash,
});
}, [invite]);
const isJoinDisabled = isGuildInviteActionDisabled(guildActionState);
const primaryActionType = getGuildInvitePrimaryAction(guildActionState);
@@ -57,7 +57,7 @@ export const InvitePagePreviewModal: React.FC<InvitePagePreviewModalProps> = obs
const splashUrl = useMemo(() => {
if (previewSplashUrl) return previewSplashUrl;
if (guild?.splash) {
return AvatarUtils.getGuildSplashURL({id: guild.id, splash: guild.splash}, 4096);
return AvatarUtils.getGuildSplashURL({id: guild.id, splash: guild.splash});
}
return null;
}, [previewSplashUrl, guild?.id, guild?.splash]);
@@ -170,7 +170,7 @@ const InviteLoginPageContainer = observer(() => {
}
const guild = guildInvite.guild;
if (guild?.splash && guild.id) {
const splashUrl = getGuildSplashURL({id: guild.id, splash: guild.splash}, 4096) ?? null;
const splashUrl = getGuildSplashURL({id: guild.id, splash: guild.splash}) ?? null;
setSplashUrl(splashUrl);
}
}, [guildInvite?.guild?.splash, guildInvite?.guild?.id, setSplashUrl]);
@@ -66,13 +66,10 @@ const InviteRegisterPage = observer(function InviteRegisterPage() {
}
const guild = guildInvite.guild;
if (guild?.splash) {
const splashUrl = AvatarUtils.getGuildSplashURL(
{
id: guild.id,
splash: guild.splash,
},
4096,
);
const splashUrl = AvatarUtils.getGuildSplashURL({
id: guild.id,
splash: guild.splash,
});
setSplashUrl(splashUrl);
}
}, [guildInvite?.guild?.splash, guildInvite?.guild?.id, setSplashUrl]);