style: Update API fetch URL to use dynamic origin for improved flexibility
This commit is contained in:
@@ -1160,7 +1160,7 @@ function Scene({ interactionMode, onInteraction }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchMiningAreas = async () => {
|
const fetchMiningAreas = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('http://localhost:3001/api/mining-areas');
|
const response = await fetch(`${window.location.origin}/api/mining-areas`);
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setMiningAreas(data);
|
setMiningAreas(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user