Skip to content

Commit b19e678

Browse files
committed
Bug fix
1 parent fd37929 commit b19e678

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

frontend/src/components/MapComponent.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,11 @@ export default function MapComponent() {
541541
let officialData = { items: [] }, userData = { items: [] };
542542

543543
try {
544+
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'https://glow-backend-v4-0-0.onrender.com/api';
545+
544546
const [officialRes, userRes] = await Promise.all([
545-
fetch(`${process.env.NEXT_PUBLIC_API_URL}/water-data`),
546-
fetch(`${process.env.NEXT_PUBLIC_API_URL}/userpoints`)
547+
fetch(`${API_URL}/water-data`),
548+
fetch(`${API_URL}/userpoints`)
547549
]);
548550

549551
if (officialRes.ok) {

0 commit comments

Comments
 (0)