Spaces:
Sleeping
Sleeping
Commit ·
735ebcc
1
Parent(s): d0dcff2
Add root route for HF Space homepage
Browse files
lifeline-ai/src/app/page.tsx
CHANGED
|
@@ -72,8 +72,8 @@ export default function Home() {
|
|
| 72 |
|
| 73 |
async function reverseGeocodeAndSet(lat: number, lng: number) {
|
| 74 |
try {
|
| 75 |
-
|
| 76 |
-
|
| 77 |
const res = await fetch(url);
|
| 78 |
if (!res.ok) throw new Error("geocode failed");
|
| 79 |
const j = await res.json();
|
|
|
|
| 72 |
|
| 73 |
async function reverseGeocodeAndSet(lat: number, lng: number) {
|
| 74 |
try {
|
| 75 |
+
const apiBase = process.env.NEXT_PUBLIC_API_BASE ?? "";
|
| 76 |
+
const url = `${apiBase}/reverse-geocode?lat=${encodeURIComponent(lat)}&lng=${encodeURIComponent(lng)}`;
|
| 77 |
const res = await fetch(url);
|
| 78 |
if (!res.ok) throw new Error("geocode failed");
|
| 79 |
const j = await res.json();
|