We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd37929 commit b19e678Copy full SHA for b19e678
1 file changed
frontend/src/components/MapComponent.jsx
@@ -541,9 +541,11 @@ export default function MapComponent() {
541
let officialData = { items: [] }, userData = { items: [] };
542
543
try {
544
+ const API_URL = process.env.NEXT_PUBLIC_API_URL || 'https://glow-backend-v4-0-0.onrender.com/api';
545
+
546
const [officialRes, userRes] = await Promise.all([
- fetch(`${process.env.NEXT_PUBLIC_API_URL}/water-data`),
- fetch(`${process.env.NEXT_PUBLIC_API_URL}/userpoints`)
547
+ fetch(`${API_URL}/water-data`),
548
+ fetch(`${API_URL}/userpoints`)
549
]);
550
551
if (officialRes.ok) {
0 commit comments