Skip to content

Commit

Permalink
Merge pull request #384 from starknet-id/refactor/cdn_public
Browse files Browse the repository at this point in the history
Refactor/cdn public
  • Loading branch information
Th0rgal authored Nov 30, 2023
2 parents 7786325 + 882ba5e commit 5a8453f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/cdn/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const CDNImg: React.FC<ImgHTMLAttributes<HTMLImageElement>> = ({
...props
}) => {
const fullPath =
process.env.NODE_ENV === "development" && src && src.startsWith("/")
process.env.NODE_ENV === "production" && src && src.startsWith("/")
? `${process.env.NEXT_PUBLIC_CDN_URL}${src}`
: src;

Expand All @@ -24,7 +24,7 @@ export const CDNImage: React.FC<CDNImageProps> = ({ src, ...props }) => {

if (typeof src === "string") {
imagePath =
process.env.NODE_ENV === "development" && src.startsWith("/")
process.env.NODE_ENV === "production" && src.startsWith("/")
? `${process.env.NEXT_PUBLIC_CDN_URL}${src}`
: src;
} else {
Expand Down

1 comment on commit 5a8453f

@vercel
Copy link

@vercel vercel bot commented on 5a8453f Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.