Skip to content

Commit

Permalink
Revert "Fix image bug" (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Jan 24, 2024
1 parent 244dd23 commit 903a352
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions util/transformSrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { bucket } from "../data/site.yaml";
const path = require('path');

// change provided srcs (png & mp4) to external bucket location for production.
export const transformSrc = (src, dir = "") => {
Expand All @@ -14,8 +13,8 @@ export const transformSrc = (src, dir = "") => {
process.env.NEXT_PUBLIC_NETLIFY_CONTEXT === "production" && // Not a deploy preview
!src.endsWith("svg")
) {
return path.join(bucket, dir, src);
return bucket + dir + src;
} else {
return path.join(dir, src);
return dir + src;
}
};

0 comments on commit 903a352

Please sign in to comment.