Skip to content

Commit

Permalink
removed size query for avatars
Browse files Browse the repository at this point in the history
  • Loading branch information
Andcool-Systems committed Oct 10, 2024
1 parent c3f385d commit 999dbbf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/me/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const Connections = ({ data, refetch }: { data: SettingsResponse, refetch(): voi
<h3><IconBrandDiscord width={32} height={32} style={{ marginRight: ".3rem", borderRadius: 0 }} />Discord аккаунт</h3>
<div className={Style.discord_container}>
{data.connections?.discord &&
<Image src={data.connections?.discord.avatar + "?size=64"} alt="" width={64} height={64} style={{ borderRadius: "50%" }} className={Style.discord_avatar} />
<Image src={data.connections?.discord.avatar} alt="" width={64} height={64} style={{ borderRadius: "50%" }} className={Style.discord_avatar} />
}
<div className={Style.discord_name_container}>
<h1>{data.connections?.discord?.name}</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/components/header.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const AvatarMenu = ({ data, loading, expanded, expand }: AvatarMenuProps) => {
<div className={`${Styles.avatar_container} ${loading && Styles.placeholders} ${data?.has_unreaded_notifications && Styles.unreaded}`} onClick={() => expand(!expanded)}>
{data?.avatar &&
<Image className={Styles.avatar}
src={data?.avatar + '?size=80'}
src={data?.avatar}
alt=''
width={80}
height={80}
Expand Down
6 changes: 3 additions & 3 deletions src/app/modules/components/me.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Default = ({ data, islogged, color }: { data: Query, islogged: boolean, co
return (
<div className={style_sidebar.card} style={{ backgroundColor: color || "var(--main-card-color)" }}>
<div className={`${style_sidebar.avatar_container} ${!islogged && style_sidebar.placeholders}`}>
{islogged && data?.avatar && <Image src={data?.avatar + "?size=1024"} alt="" width={150} height={150} priority={true} draggable={false} />}
{islogged && data?.avatar && <Image src={data?.avatar} alt="" width={150} height={150} priority={true} draggable={false} />}
</div>
<h3>{data?.name}</h3>
<p className={style_sidebar.username}>{data?.username}</p>
Expand All @@ -35,10 +35,10 @@ const Default = ({ data, islogged, color }: { data: Query, islogged: boolean, co
const ImprovedTheme = ({ data, islogged }: { data: Query, islogged: boolean }) => {
return (
<div className={style_sidebar.background_image_container}>
{islogged && data?.avatar && <Image src={data?.avatar + "?size=512"} alt="" width={512} height={512} className={style_sidebar.background_image} quality={100} priority={true} />}
{islogged && data?.avatar && <Image src={data?.avatar} alt="" width={512} height={512} className={style_sidebar.background_image} quality={100} priority={true} />}
<div className={`${style_sidebar.card} ${style_sidebar.card_improved}`}>
<div className={`${style_sidebar.avatar_container} ${!islogged && style_sidebar.placeholders}`}>
{islogged && data?.avatar && <Image src={data?.avatar + "?size=1024"} alt="" width={150} height={150} priority={true} draggable={false} />}
{islogged && data?.avatar && <Image src={data?.avatar} alt="" width={150} height={150} priority={true} draggable={false} />}
</div>
<h3>{data?.name}</h3>
<p className={style_sidebar.username}>{data?.username}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/users/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const generateMetadata = async ({ params }: { params: { name: string } })
description: `${numbersTxt(data.works_count, ['работа', 'работы', 'работ'])}`,
url: `https://pplbandage.ru/users/${data.username}`,
siteName: 'Повязки Pepeland',
images: `${data.avatar}?size=256`
images: data.avatar
},
twitter: {
card: 'summary'
Expand Down

0 comments on commit 999dbbf

Please sign in to comment.