Skip to content

Commit be428a6

Browse files
authored
Merge pull request #325 from prgrms-web-devcourse-final-project/feat/image-resize
[fix] ImageKitimg 컴포넌트 사이즈 수정
2 parents ef38366 + 4b599e7 commit be428a6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/ImageKitImg.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function ImageKitImg({
2020
return (
2121
<img
2222
className={className}
23-
src={`https://ik.imagekit.io/${import.meta.env.VITE_IMAGEKIT_ID}/${imagePath}?tr=w-${width},h-${height}`}
23+
src={`https://ik.imagekit.io/${import.meta.env.VITE_IMAGEKIT_ID}/${imagePath}?tr=w-${width * 2},h-${height * 2}`}
2424
width={width}
2525
height={height}
2626
onError={(e) => {

src/components/user/EmotionRecordCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ function EmotionRecordCard({ record, onClick }: EmotionRecordCardProps) {
2323
<EmotionBadge size="small" emotion={emotion} />
2424
<ImageKitImg
2525
src={albumImage}
26-
height={232}
27-
width={232}
26+
height={116}
27+
width={116}
2828
className="object-cover w-full rounded-lg aspect-square"
2929
/>
3030
</div>

src/pages/home/components/MainCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export default function MainCard({ record }: MainCardProps) {
2727
<div className="flex-shrink-0 w-16 h-16 overflow-hidden rounded-lg">
2828
<ImageKitImg
2929
src={record.spotifyMusic.albumImage}
30-
width={160}
31-
height={160}
30+
width={64}
31+
height={64}
3232
className="object-cover w-full h-full"
3333
/>
3434
</div>

0 commit comments

Comments
 (0)