diff --git a/app/locations/[location]/page.tsx b/app/locations/[location]/page.tsx index c5df968..b0113f6 100644 --- a/app/locations/[location]/page.tsx +++ b/app/locations/[location]/page.tsx @@ -14,7 +14,7 @@ export default function Page({ params }: { params: { location: number } }) { const [foodReviews, setFoodReviews] = useState(null); useEffect(() => { - fetchLocations().then((locations: Location[]) => { + fetchLocations().then(async (locations: Location[]) => { if (params.location < 0 || params.location >= locations.length) { return

Location not found

; }