Skip to content

Commit

Permalink
improve getResizedImage
Browse files Browse the repository at this point in the history
  • Loading branch information
mebtte committed Sep 14, 2023
1 parent dd00179 commit 1cc9546
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function Musicbill({
size={ICON_SIZE}
src={getResizedImage({
url: musicbill.cover,
size: ICON_SIZE * 2,
size: ICON_SIZE * window.devicePixelRatio,
})}
publiz={musicbill.public}
shared={musicbill.sharedUserList.length > 0}
Expand Down
6 changes: 3 additions & 3 deletions apps/pwa/src/pages/player/pages/exploration/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function Wrapper() {
key={item.value.id}
src={getResizedImage({
url: item.value.cover,
size: ITEM_MIN_WIDTH * 2,
size: ITEM_MIN_WIDTH * window.devicePixelRatio,
})}
style={{ width: itemWidth }}
onClick={() => openMusicDrawer(item.value.id)}
Expand All @@ -132,7 +132,7 @@ function Wrapper() {
key={item.value.id}
src={getResizedImage({
url: item.value.avatar,
size: ITEM_MIN_WIDTH * 2,
size: ITEM_MIN_WIDTH * window.devicePixelRatio,
})}
style={{ width: itemWidth }}
onClick={() => openSingerDrawer(item.value.id)}
Expand All @@ -146,7 +146,7 @@ function Wrapper() {
key={item.value.id}
src={getResizedImage({
url: item.value.cover,
size: ITEM_MIN_WIDTH * 2,
size: ITEM_MIN_WIDTH * window.devicePixelRatio,
})}
style={{ width: itemWidth }}
onClick={() => openMusicbillDrawer(item.value.id)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function CollectionList() {
id={c.id}
cover={getResizedImage({
url: c.cover,
size: ITEM_MIN_WIDTH * 2,
size: ITEM_MIN_WIDTH * window.devicePixelRatio,
})}
name={c.name}
userId={c.user.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function Wrapper() {
id={musicbill.id}
cover={getResizedImage({
url: musicbill.cover,
size: ITEM_MIN_WIDTH * 2,
size: ITEM_MIN_WIDTH * window.devicePixelRatio,
})}
name={musicbill.name}
userId={musicbill.user.id}
Expand Down
2 changes: 1 addition & 1 deletion apps/pwa/src/pages/player/pages/search/singer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function Wrapper() {
singerName={singer.name}
singerAvatar={getResizedImage({
url: singer.avatar,
size: ITEM_MIN_WIDTH * 2,
size: ITEM_MIN_WIDTH * window.devicePixelRatio,
})}
singerAliases={singer.aliases}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Content({ singer }: { singer: Singer }) {
singer.avatar
? getResizedImage({
url: singer.avatar,
size: COVER_SIZE * 2,
size: COVER_SIZE * window.devicePixelRatio,
})
: ''
}
Expand Down

0 comments on commit 1cc9546

Please sign in to comment.