From 1b8c6d5a9d7632cdb1afda2e04ab5586bbbfa5b0 Mon Sep 17 00:00:00 2001 From: Anya Zhang Date: Fri, 31 May 2024 18:04:07 -0700 Subject: [PATCH] oops revert edit that caused error async --- app/locations/[location]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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

; }