style: Update API fetch URL to use dynamic origin for improved flexibility

This commit is contained in:
MayaTheShy
2026-02-20 03:09:53 -05:00
parent 1a2de77ae2
commit 9cb2939224

View File

@@ -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);