Skip to content

Commit

Permalink
fix: remove log and correctly set the if statement for the cached ima…
Browse files Browse the repository at this point in the history
…ge component
  • Loading branch information
JoaquinOlivero committed Sep 10, 2024
1 parent e6e2523 commit 17e852e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/Common/CachedImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ const CachedImage = ({ src, ...props }: ImageProps) => {
if (typeof imageUrl === 'string' && imageUrl.startsWith('http')) {
const parsedUrl = new URL(imageUrl);

console.log(parsedUrl);

if (parsedUrl.host === 'image.tmdb.org') {
if (currentSettings.cacheImages)
imageUrl = imageUrl.replace('https://image.tmdb.org', '/imageproxy');
}

if (parsedUrl.protocol === 'http:') {
} else if (parsedUrl.host !== 'gravatar.com') {
imageUrl = '/avatarproxy/' + imageUrl;
}
}
Expand Down

0 comments on commit 17e852e

Please sign in to comment.