Skip to content

Commit

Permalink
oops revert edit that caused error async
Browse files Browse the repository at this point in the history
  • Loading branch information
anyazhang17 committed Jun 1, 2024
1 parent 3f3b818 commit 1b8c6d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/locations/[location]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Page({ params }: { params: { location: number } }) {
const [foodReviews, setFoodReviews] = useState<FrontEndReviews | null>(null);

useEffect(() => {
fetchLocations().then((locations: Location[]) => {
fetchLocations().then(async (locations: Location[]) => {
if (params.location < 0 || params.location >= locations.length) {
return <h1>Location not found</h1>;
}
Expand Down

0 comments on commit 1b8c6d5

Please sign in to comment.