From 89b3ed7a7d1f44ee0bf016e23619c16d636271a9 Mon Sep 17 00:00:00 2001 From: AkhilS2 <55607137+AkhilS2@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:38:46 -0700 Subject: [PATCH] formatted --- app/foods/[food]/page.tsx | 2 +- app/profile/page.tsx | 12 ++++++------ app/requests.ts | 2 +- components/location/categories.tsx | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/foods/[food]/page.tsx b/app/foods/[food]/page.tsx index 0b4f7f9..dd530f9 100644 --- a/app/foods/[food]/page.tsx +++ b/app/foods/[food]/page.tsx @@ -76,4 +76,4 @@ export default function Page({ params }: { params: { food: string } }) { ))} ); -} \ No newline at end of file +} diff --git a/app/profile/page.tsx b/app/profile/page.tsx index 8fd53c1..622dbe6 100644 --- a/app/profile/page.tsx +++ b/app/profile/page.tsx @@ -29,7 +29,7 @@ const Page = () => { ]); const [reviews, setReviews] = useState({}); const [notificationsEnabled, setNotificationsEnabled] = useState( - cookies.notificationsEnabled === "true" + cookies.notificationsEnabled === "true", ); const [foodNames, setFoodNames] = useState([]); const [loading, setLoading] = useState(true); @@ -65,9 +65,9 @@ const Page = () => { const allFoodNames = locations.flatMap((location) => location.categories.flatMap((category) => category.sub_categories.flatMap((sub_category) => - sub_category.foods.map((food) => food.name) - ) - ) + sub_category.foods.map((food) => food.name), + ), + ), ); setFoodNames(allFoodNames); console.log("Food Names:", allFoodNames); @@ -101,8 +101,8 @@ const Page = () => { }); const filteredReviews = Object.fromEntries( Object.entries(reviews).filter( - ([_, review]) => review.user_rating != null - ) + ([_, review]) => review.user_rating != null, + ), ); setReviews(filteredReviews); setLoading(false); diff --git a/app/requests.ts b/app/requests.ts index 80c4405..031f964 100644 --- a/app/requests.ts +++ b/app/requests.ts @@ -62,7 +62,7 @@ export const fetchUserInfo = async () => { "https://www.googleapis.com/oauth2/v3/userinfo", { headers: { Authorization: `Bearer ${access_token}` }, - } + }, ); const userInfo = response.data; diff --git a/components/location/categories.tsx b/components/location/categories.tsx index fc830b2..d1d83a6 100644 --- a/components/location/categories.tsx +++ b/components/location/categories.tsx @@ -20,7 +20,7 @@ export default function LocationCategories({ new Array(location.categories.length).fill(false).map((_, index) => { switch (index) { case 0: // Breakfast (6 AM - 11 AM) - return currentHour < 11 && currentHour >= 6; + return currentHour < 11 && currentHour >= 6; case 1: // Lunch (11 AM - 3 PM) return currentHour < 15 && currentHour >= 11; case 2: // Dinner (6 PM - 9 PM)