Skip to content

Commit

Permalink
Configure gallery to use the BASE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
n9iels committed Aug 27, 2023
1 parent 305d3f3 commit d48b722
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
34 changes: 0 additions & 34 deletions README.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/js/gallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Gallery extends BaseComponent {
newImage.navElement.classList.add("c-gallery__nav-button--active");

this.currentItemIndex = index;
this.$currentImage.src = newImage.url;
this.$currentImage.src = import.meta.env.BASE_URL + newImage.url;
}

nextImage() {
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('vite').UserConfig} */
export default {
base: "https://n9iels.github.io/ecommerce-product-page/",
base: "https://n9iels.github.io/ecommerce-product-page",
};

0 comments on commit d48b722

Please sign in to comment.