This commit is contained in:
scarlett committed 2024-05-14 17:52:39 -04:00
commit 3781e9adcf
2 files changed
+5 -2

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ import Modal from "react-modal";
import "../assets/stylesheets/cabledetail.scss";
Modal.setAppElement("#root");
const hostname = window.location.hostname; // Get the hostname from the URL bar
class Cable {
constructor(cableData) {
@@ -14,7 +15,7 @@ class Cable {
this.brand = cableData.brand;
this.position = cableData.position;
this.image = cableData.image
? `http://localhost${cableData.image}`
? `http://${hostname}${cableData.image}`
: DefaultPartImg;
this.dynamicProps = {};
this.horizontal = [];