Skip to content

Commit 1c5a58b

Browse files
set width to all images by using the inbuilt attribute, skeleton profile pictures are closer to their actual size
1 parent d026bda commit 1c5a58b

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/components/UI/Icon.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ const Icon: FC<IconProps> = ({ code, language, type }) => {
6868
<img
6969
src={`https://flagcdn.com/w40/${code}.png`}
7070
alt={language}
71-
className="mx-2 w-8"
72-
></img>
71+
className="mx-2"
72+
width={32}
73+
/>
7374
)
7475
const search = (
7576
<svg

src/components/UI/navigation/HomeIcon.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const HomeIcon = () => {
3131
alt="Twitch-App Homepage"
3232
loading="lazy"
3333
className="rounded-md"
34+
width={48}
3435
/>
3536
{(contextScreenWidth === 'TABLET' ||
3637
contextScreenWidth === 'DESKTOP') && (

src/components/skeleton/SkeletonProfilePicture.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const SkeletonProfilePicture = () => {
22
return (
33
<div
44
className="rounded-full p-1 col-span-1 mx-auto animate-pulse bg-zinc-50"
5-
style={{ width: 'min(48px, 80%)', aspectRatio: '1/1' }}
5+
style={{ width: 'max(36px, 80%)', aspectRatio: '1/1' }}
66
></div>
77
)
88
}

src/components/streamFeed/StreamThumbnail.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const StreamThumbnail: FC<StreamThumbnailProps> = ({
3535
'THUMBNAIL'
3636
)}
3737
alt={`${user_name} Livestream`}
38-
className="rounded-xl w-full"
38+
className="rounded-xl"
39+
width="100%"
3940
loading="lazy"
4041
title={
4142
stream_game
@@ -54,7 +55,8 @@ const StreamThumbnail: FC<StreamThumbnailProps> = ({
5455
'THUMBNAIL'
5556
)}
5657
alt={`loading ${user_name}`}
57-
className="rounded-xl w-full"
58+
className="rounded-xl"
59+
width="100%"
5860
loading="lazy"
5961
onLoad={() => setLoaded(true)}
6062
data-testid={testid}

0 commit comments

Comments
 (0)